PDA

Click to See Complete Forum and Search --> : saving text with common dialog control


SteveCRM
Jan 1st, 2000, 10:20 PM
How can I save text from a rich text box using the Common Dialog control?

Thanks :)

Steve

Jan 1st, 2000, 10:36 PM
It isnt the Common Dialog that saves the text, it is just a way of obtaining a filename.

once the user has closed the commondialog, you need to make the app OPEN the Filename FOR OUTPUT...


dim MyFile as byte
MyFile = freefile
Open commondialog.filename for output as #Myfile
print #Myfile, RichText1.text
close #MyFile


and that should do the trick!




------------------

Wossname,
Email me: wossnamex@talk21.com :)

SteveCRM
Jan 2nd, 2000, 03:05 AM
I get an error on this line:
Open CommonDialog1.FileName For Output As #MyFile
it says "Path\File Access Error"

Steve