VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Saves listbox contents during transfer from 1 listbox to another listbox. This creates a file calle

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

Rate Saves listbox contents during transfer from 1 listbox to another listbox. This creates a file calle



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


Download this snippet    Add to My Saved Code

Saves listbox contents during transfer from 1 listbox to another listbox. This creates a file calle Comments

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.

Post your comment

Subject:
Message:
0/1000 characters