Private Sub cmdshow1_Click()
Dim strData As String
Dim strLine() As String
Dim strField() As String
Open "dlgfile1.filename" For Input As #1
Line Input #1, strData
Close #1
Exit Sub
strData = Mid(strData, InStr(strData, "GOTO/"))
strLine = Split(strData, "GOTO/")
Dim n As Integer
Dim i As Integern = 0
For i = 0 To UBound(strLine)
  If strLine > " " Then
    strField = Split(strLine, ",")
    If UBound(strField) >= 2 Then
        ReDim Preserve x(n)
        ReDim Preserve y(n)
        ReDim Preserve z(n)
        x(n) = Val(strField(0))
        y(n) = Val(strField(1))
        z(n) = Val(strField(2))
        n = n + 1
    End If
  End If
Next i
   dlgfile1.ShowOpen
   iblout1.Caption = dlgfile1.FileName
   
End Sub
这段程序我运行时会一直提示语句不匹配,麻烦哪位高手能不能帮我看下,最好能帮我改过来,谢谢

解决方案 »

  1.   

    看了个稀里糊涂
    不过
    If strLine > " " Then这句有问题
    strLine是数组,不能直接比较的。。
    用strLine(i)> " " 之类的比较。。
      

  2.   

    Open "dlgfile1.filename" For Input As #1这句是不是打开文件
    Open dlgfile1.filename For Input As #1应该这样写吧
      

  3.   

    Close #1
    Exit Sub
    这里就退出了,后面的代码是不是不用了?
      

  4.   

    If strLine > " " Then
    这句有问题