CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 1999
    Location
    California, USA
    Posts
    40

    whats the code for saving a file?

    hey you guys, thanks for clickin' on my link, i have been asking people how to save a file in vb, you no where you go to File|Save as, now whats the code for that? thanks

    PanasonicSubz

  2. #2
    Join Date
    Nov 1999
    Location
    Södertäje
    Posts
    4

    Re: whats the code for saving a file?

    Hi.

    Well, i do it like this :

    open app.path & "\savefile.sav" for output as #1 ' opening a newfile app.path were the program is running from and a filename
    write #1, text1.text ' you can use write #1 or print #1 but write #1 is better
    close #1 ' closing the file
    call shell("explorer" & app.path & "\savefile.sav",1) ' opening the file in notepad




    [email protected]



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

Featured