by Jim Teakles / other programmers (1 Submission)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Wed 9th May 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Saves listbox contents during transfer from 1 listbox to another listbox. This creates a file called xxxx.lst // Also works from 1 form to
Dim a As Integer
Dim ff As Integer
Dim Header As String
Dim LCount As Long
Dim numbyte As Byte
ff = FreeFile
With Form1.List1
For i = .ListCount - 1 To 0 Step -1
If .Selected(i) = True Then
Form2.List1.AddItem .List(i)
.RemoveItem i
End If
Next
Open "C:\list1.lst" For Binary As #1
Header = "List 1"
Put ff, 1, Header
LCount = List1.ListCount
Put ff, , LCount
For a = 0 To List1.ListCount - 1
numbyte = Len(List1.List(a))
Put ff, , numbyte
Put ff, , List1.List(a)
Next a
Close ff
End With
End Sub
No comments have been posted about Saves listbox contents during transfer from 1 listbox to another listbox. This creates a file calle. Why not be the first to post a comment about Saves listbox contents during transfer from 1 listbox to another listbox. This creates a file calle.