Results 1 to 3 of 3

Thread: [RESOLVED] Outputting to a .bat file

  1. #1

    Thread Starter
    Registered User
    Join Date
    Apr 2006
    Posts
    139

    Resolved [RESOLVED] Outputting to a .bat file

    Hi everyone,

    How do I create a .bat file on "c:" of my local disk, then export the contents of a listbox to that .bat file?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Outputting to a .bat file

    VB Code:
    1. Dim i As Long
    2.  
    3. Open "c:\skakels.bat" For Output As #1
    4.     For i = 0 To List1.ListCount - 1
    5.         List1.Selected(i) = True
    6.         Print #1, List1.List(List1.ListIndex)
    7.     Next
    8.     Close #1

  3. #3

    Thread Starter
    Registered User
    Join Date
    Apr 2006
    Posts
    139

    Re: Outputting to a .bat file

    Thank you Hack, that fixed me.

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