1
I would like to read a txt file through VBA.
All the codes I found on the internet loop the file (to get all the lines I suppose), but I wanted to take just the first line more simply and put in a variable.
Here’s my current code, which picks up the text but I’m not finding it cool:
Dim conexao As String
Dim ReadData As String
Open "C:\Sistema\Conexao.txt" For Input As #1
Do Until EOF(1)
Line Input #1, ReadData
conexao = ReadData
If Not Left(ReadData, 1) = "*" Then
End If
Loop
Close #1