Dears,
I'm actually working with the following code to read a .txt file.
But now I stored this txt file online. How can I work it?
Thank you
I'm actually working with the following code to read a .txt file.
Code:
Sub DepAptSID()
'Esta função coleta as saídas disponíveis nos aeroportos
Dim fn As String, txt As String, delim As String, DepSID() As String, SID As String
Dim i As Long, ii As Long, iii As Long, n As Long, X, y, ContValores As Integer
fn = "C:\Users\bruno\Desktop\FMS ATR\DataBase\SID\" & DepAirport & ".txt" 'My txt file path.
delim = "|" 'Delimiter
temp = CreateObject("Scripting.FileSystemObject").OpenTextFile(fn).ReadAll
X = Split(temp, vbCrLf)
ContValores = 0
For i3 = 1 To UBound(X)
'Define how many times the SID was found
If InStr(1, X(i), "|" & DepRwySel & "|", 1) > 0 Then
ContValores = ContValores + 1
End If
i = i + 1
Next i3
But now I stored this txt file online. How can I work it?
Thank you