哦,把上边 function应该是sub

解决方案 »

  1.   

    llenstr = InStr(instr1, ";")有错
    请看仔细一些
      

  2.   

    哦,把上边 function应该是sub
      

  3.   

    instr(起始位置,准备查找的字符串,要查找的字符串)
      

  4.   

    对llenstr = InStr(instr1, ";")有错
      

  5.   


    Public Function sprs(instr1 As Variant) As Variant
    Dim bb(1) As String
    Dim llenstr As Integerllenstr = InStr(instr1, ";")
    bb(0) = Left(instr1, llenstr - 1)
    bb(1) = Right(instr1, Len(instr1) - llenstr)
    sprs = bbEnd FunctionPrivate Sub Command1_Click()Text1 = sprs(Label1.Caption)(0)
    Text2 = sprs(Label1.Caption)(1)End Sub