|
-
Jul 13th, 2003, 04:34 AM
#1
Thread Starter
New Member
How to open a saved listbox?
Hi
I'm making an adressbook.I fill in lastname, firstname, city & phonenumber, each in a textbox. By clicking on a Comm.Button everything goes into a listbox (items sorted on lastname). To SAVE everything I use next code:
Dim intT As Integer
Dim F As Integer
Dim strLijst As String
On Error Resume Next
F = FreeFile
Open "Filename.extension" For Output As #F
Print
For intT = 1 To List1.ListCount
Print #F, List1.List(intT - 1)
Next intT
Close #F
End If
Does anyone have the code to OPEN the listbox? THX
-
Jul 13th, 2003, 08:11 AM
#2
Hyperactive Member
-
Jul 13th, 2003, 03:00 PM
#3
-= B u g S l a y e r =-
VB Code:
Private Sub Command1_Click()
Dim s As String
List1.Clear
Open "C:\TEST.TXT" For Input As #1
Do While Not EOF(1)
Line Input #1, s
List1.AddItem s
Loop
Close #1
End Sub
-
Jul 14th, 2003, 04:35 AM
#4
Thread Starter
New Member
listbox
Code is working well...thanks a lot.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|