Results 1 to 5 of 5

Thread: how do i make my program make text files and save them?

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 1999
    Location
    Texas, US
    Posts
    45

    Post

    I need to be able to save text files to file and access them later without using common dialogs, any code?

  2. #2

  3. #3

    Thread Starter
    Member
    Join Date
    Sep 1999
    Location
    Texas, US
    Posts
    45

    Post

    yeah, but i meant WITHOUT using the common dialog control, but thanks any way

  4. #4
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post

    just read the part about opening the file for output and putting data into it, not the commondialog part. Are you looking for a way to display to the user something similar to the commondialog control?

  5. #5
    Guest

    Post

    You could use this code to save the file:

    Code:
    Private Sub Command1_Click()
    
       Open YourFile.txt for Output as #1
       Print #1, Text1.Text
       Close #1
    
    End Sub
    And for opening the file, you could use...

    Code:
    Private Sub Command2_Click()
    
       Open YourFile.txt for Input as #1
       Text1.Text = Input(LOF(1),1)
       Close #1
    
    End Sub

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