PDA

Click to See Complete Forum and Search --> : Save a list box


Matt-D
Jan 3rd, 2000, 08:05 PM
I have a list (list1) and I want to save it via a CommonDialogue, but I only know how to save a text from a text box.

Can anybody help me how to save the items of a list box (in VB3) ?????

Thanx

Mark Sreeves
Jan 3rd, 2000, 08:45 PM
here you go:

Dim i As Integer
Dim fnum As Long

fnum = FreeFile
Open "C:\list.txt" For Output As fnum
For i = 0 To List1.ListCount - 1
Print #fnum, List1.List(i)
Next i
Close fnum



------------------
Mark Sreeves
Analyst Programmer

Mark.Sreeves@Softlab.co.uk
A BMW Group Company