Alan McGowan
Senior Member
- Outlook version
- Outlook 2013 64 bit
- Email Account
- Exchange Server
I am trying to populate multiple textboxes based on the value on each line in a txt file.
Using the above code I can populate textbox1 with the value in the first line of the text file (settings.txt), but how would I populate textbox2 with the value in the second line in the text file and so on. Each line is either YES or NO in the text file
Code:
Dim fn As String, ff As Integer, txt As String
fn = "D:\filemail\settings.txt" '< --- .txt file path
txt = Space(FileLen(fn))
ff = FreeFile
Open fn For Binary As #ff
Get #ff, , txt
Close #ff
TextBox1.Value = txt
Using the above code I can populate textbox1 with the value in the first line of the text file (settings.txt), but how would I populate textbox2 with the value in the second line in the text file and so on. Each line is either YES or NO in the text file