Library code snippets
Saving combo items to a file
By James Crowley, published on 14 Jul 2001
Here's some code to show you how to save some combo items to a file. This could be useful when creating a find history or favourites combo box. Please see 'Loading combo items from a file' for the code to re-load the data.
Private Sub SaveItems()
Dim filenum As Integer
Dim i As Integer
filenum = FreeFile '// Get a free file number
Open App.Path & "items.txt" For Output As filenum '// open
the file
For i = 0 To Combo1.ListCount - 1
Print #filenum, Combo1.List(i) '//
write each item to the file
Next
Close filenum '// Close the file
End Sub
Related articles
Related discussion
-
Regarding Visual Basic Programme
by manjunathsl2007 (0 replies)
-
how do you hide all in VB6
by CapnJack (1 replies)
-
Problem with Input File
by novavb6 (3 replies)
-
How to produce a txt file with a table??
by novavb6 (1 replies)
-
VB6 compatability from XP to Vista
by bronx (1 replies)
This thread is for discussions of Saving combo items to a file.