I'm having trouble finding how I can read the number of lines in a text file I'm reading without reopening the file again. Thanks in advance for your time. I apologize in advance if you manage to find what I'm talking about easily (which I have done my due diligence already).
Sub CreateMessage()
Dim filepath As String
' Read filepath in spreadsheet
filepath = Cells(6, 8)
' Parse string contents from script
' Open file
Open filepath For Input As #1
How do I read each line of the text file into a dynamic array, with size to be determined by the number of lines in the text file right at this line?
' Close file
Close #1
End Sub