PanasonicSubz
November 21st, 1999, 04:40 PM
Hey i need some help, i am making this text simple program and, you no the part where the user selects File|Save as, wekk i need the code for the saving. Please help, thanks
PanasonicSubz
PanasonicSubz
|
Click to See Complete Forum and Search --> : How so i save to a file? PanasonicSubz November 21st, 1999, 04:40 PM Hey i need some help, i am making this text simple program and, you no the part where the user selects File|Save as, wekk i need the code for the saving. Please help, thanks PanasonicSubz November 21st, 1999, 05:07 PM Right - first you need to open a file for writing: fn=FreeFile Open Path & FileName for input as #fn This code opens a file so that you can write data into it, creating it if it doesn't already exist. And then you put the contents of the text box into the file. Assuming your textbox is called Text1: print #fn, Text1.Text Then you close the file: close #fn And that's all there is to it. One final word - Path and FileName above are strings. They contain the location you are saving to. Path must end with a "\" or FileName must start with one, but not both. Path and FileName can both be retrieved by using the Common Dialog Save "Path" and "FileName" properties. Hope this helps. codeguru.com
Copyright Internet.com Inc., All Rights Reserved. |