你可以用InStr去查第一个'的位置和第二个'的位置,再用mid$去取两个''号之间的字符。
例如先定义一个布尔变量B和一个整数变量I,每查到一个'后I=I+1,如果I为偶数B为真,用mid$求两个位置之间的字符,如果I为奇数继续求下一个'的位置。

解决方案 »

  1.   

    自己编吧。Function getString(sSrc As String, cKey As String) As String
       Dim iLen As Integer
       Dim i As Integer
       Dim cChar As String
       Dim flag As Boolean
       Dim sResult As String
       Dim iBegin As Integer
       
       iLen = Len(sSrc)
       For i = 0 To iLen
          cChar = Mid(sSrc, i + 1, 1)
          If cChar = cKey Then
             If flag Then
             
                Exit For
             Else
                iBegin = i
                flag = True
             End If
          End If
       Next i
       
       sResult = Mid(sSrc, iBegin + 1, i - iBegin)
       getString = sResult
    End FunctionsSrc是源字符串,cKey为你要找的符号,例如Private Sub Form_Load()
    Dim ss As String
    ss = "asdfasdf'fdfdfdfd'fdfdf"
    Print getString(ss, "'")End Sub会输入出fdfdfdfd
    试试看,
      

  2.   

    VB6有一个函数Split,用用看吧,也许速度不快,但很好用。