I'm trying to read a text file using vba. I tried the below code
Open "C:ester.txt" For Input As #1
Worksheets("UI").Range("H12").Value = Input$(LOF(1), 1)
Close #1
When I run this I'm getting an error.
Run-time error '62'. Input past end of file.
The content of text file is:
Unable to open COM10. Make sure it is connected
Plus other stuff
And more stuff
way more stuff
Thanks in advance for help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…