Line Input error excel VBA

2019-09-14 20:50发布

I'm having this compile error : "Expected: End of statement" and I just don't understand why The code:

Private Sub CommandButton8_Click()
Dim myFile As String, text As String, textline As String, posLat As Integer, posLong As Integer
myFile = "E:\output.txt"
myFile = Application.GetOpenFilename()
Open myFile For Input As #1
Do Until EOF(1)
       Line Input #1,textline
   text = text & textline
Loop
Close #1

End Sub

The error is at line "Line Input #1,textline" Can anybody help me, please?

0条回答
登录 后发表回答