Results 1 to 3 of 3

Thread: File Output

  1. #1

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    8

    Angry

    I have been programming in VB 6.0 for some time now, but I still can't output more than one line to a file. Here is my code:

    Open "blah.txt" For Output As #1
    Print #1, "YES"
    Print #1, "NO"
    Close #1

    only "YES" shows up in "blah.txt", what is wrong???
    (sic) in the hed.

  2. #2
    Addicted Member Michael Woolsey's Avatar
    Join Date
    Nov 2000
    Location
    Calgary, Alberta, Canada.
    Posts
    243
    I just thought I would mention that I tested out your sample code. I was trying to replicate your problem, I copied and pasted your code into a button function and it seemed to work fine, I got both YES and NO in my text file.

    Not that is should make a difference, but do you have the latest service pack for VB?

    I'm sure this isn't much help, but I thought I would tell you regardless.

    Michael


  3. #3

    Thread Starter
    New Member
    Join Date
    Nov 2000
    Posts
    8
    I feel EXTREMELY stupid. I had two copys of the same text file in different folders but I was checking the wrong one. I am embarrassed.
    (sic) in the hed.

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