K
Keith
Hello, I am trying to learn how to work with the list of
informtion in a listbox. I have added the list using
AddItem. Now I want to print that list to file. The
following code does not work, and has my notes. I would
appreciate any suggestions on how to make the print
statement work, but also how to move data into this two-
column listbox list.
Thank you
Keith
var3 = ListBox1.ListCount
Close #1
i = 0
Open "c:\test\temp.txt" For Output As #1
For i = 0 To var3 - 1 'Each In ListBox1
'i = i + 1
Print #1, i
'Print #1, ListBox1(i).Value ' not accepted at run
time
'Print #1, ListBox1(i, 1).Value ' not accepted at run
time
'Print #1, ListBox1(i, 0).Value ' not accepted
'Print #1, ListBox1(i).Text
Next i
Close #1
informtion in a listbox. I have added the list using
AddItem. Now I want to print that list to file. The
following code does not work, and has my notes. I would
appreciate any suggestions on how to make the print
statement work, but also how to move data into this two-
column listbox list.
Thank you
Keith
var3 = ListBox1.ListCount
Close #1
i = 0
Open "c:\test\temp.txt" For Output As #1
For i = 0 To var3 - 1 'Each In ListBox1
'i = i + 1
Print #1, i
'Print #1, ListBox1(i).Value ' not accepted at run
time
'Print #1, ListBox1(i, 1).Value ' not accepted at run
time
'Print #1, ListBox1(i, 0).Value ' not accepted
'Print #1, ListBox1(i).Text
Next i
Close #1