Click to See Complete Forum and Search --> : whats the code for saving a file?


PanasonicSubz
November 22nd, 1999, 06:03 PM
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

deathwalk
November 22nd, 1999, 07:55 PM
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




deathwalk@hotmail.com