|
この方が確実かも?
Public Function GetData(vntValue As Variant) As Variant
Const cstrFindTop As String = "values("
Const cstrFindEnd As String = ");"
Dim lngPosTop As Long
Dim lngPosEnd As Long
Dim lngLenght As Long
GetData = ""
lngLenght = Len(cstrFindTop)
lngPosTop = InStr(1, vntValue, cstrFindTop, vbTextCompare)
If lngPosTop = 0 Then
Exit Function
End If
lngPosEnd = InStr(lngPosTop + lngLenght + 1, _
vntValue, cstrFindEnd, vbTextCompare)
GetData = Mid(vntValue, lngPosTop + lngLenght, _
lngPosEnd - lngPosTop - lngLenght)
End Function
|
|