Results 1 to 3 of 3

Thread: Clear text file ::RESOLVED::

  1. #1

    Thread Starter
    Registered User
    Join Date
    Sep 2002
    Posts
    221

    Question Clear text file ::RESOLVED::

    Hi

    How do you clear a text file. I dont want to delete it, I just want it to be blank?
    Last edited by jennysmith; Sep 28th, 2002 at 03:24 PM.

  2. #2
    Randalf the Red honeybee's Avatar
    Join Date
    Jun 2000
    Location
    off others' brains
    Posts
    4,345

    Well ...

    Code:
    Open "MyText.Txt" For Output As #1
    Close #1
    .
    I am not a complete idiot. Some parts are still missing.
    Check out the rtf-help tutorial
    General VB Faq Thread
    Change is the only constant thing. I have not changed my signature in a long while and now it has started to stink!
    Get more power for your floppy disks. ; View honeybee's Elite Club:
    Use meaningfull thread titles. And add "[Resolved]" in the thread title when you have got a satisfactory response.
    And if that response was mine, please think about giving me a rep. I like to collect them!

  3. #3
    PowerPoster
    Join Date
    Aug 2002
    Location
    NY, NY
    Posts
    2,139
    Very simple:
    VB Code:
    1. Private Sub Form_Load()
    2.     Open "c:\test.txt" For Output As #1
    3.         'file is empty
    4.     Close #1
    5. End Sub
    Roy

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