Results 1 to 2 of 2

Thread: Save a list box

  1. #1

    Thread Starter
    Hyperactive Member Matt-D's Avatar
    Join Date
    Nov 1999
    Location
    Mettmann, Germany
    Posts
    305

    Post

    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

  2. #2
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845

    Post

    here you go:
    Code:
    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

    [email protected]
    A BMW Group Company

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width