[RESOLVED] Extracting Info from ListBox
hi, Right.... how do I get information from a ListBox.
The user will click a date from the list then click a button which will save the date as a file:
Code:
Open (App.Path & "\BookInDates\" & lstDates.Text) For Output As #1
this give the "path not found error" as lstDates.Text = "" when it should equal a date.
Re: Extracting Info from ListBox
a listbox has a collection of listboxitems. so you have to get the listboxitem's text, not listbox's text itself. a crude example:
Code:
lstDates.SelectedItems(0).Text
Re: Extracting Info from ListBox
Likely because of slashes (/) in the file name. The following characters are
not allowed in a file name:
\ / : * ? < > | "
You state that lstDates.Text = "", so show the code for lstDates_Click