Link to home
Start Free TrialLog in
Avatar of mkdjo
mkdjoFlag for Germany

asked on

save in commondialog

I want to save text5.text with the commondialog. I use:
Private Sub save_Click()
CommonDialog1.CancelError = True
CommonDialog1.DialogTitle = "Commando save"
On Error Resume Next
CommonDialog1.ShowSave
End Sub

My problem is, I don't know how to specify what I want to save.
Sorry, thats all my points.
ASKER CERTIFIED SOLUTION
Avatar of swilt
swilt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of mkdjo

ASKER

I want to save the content of a textbox, for example text5.text. How can I choose to save this?
Avatar of swilt
swilt

As in CommonDialog1.FileName = Text5.Text, the variable holding the filename;

or

dim fh as integer

fh = freefile
open "MyFile.txt" for output as #fh
print #fh, Text5.Text  ' Could use Write #fh, Text5.Text
close #fh
Avatar of mkdjo

ASKER

Oh yes, thank you very much.
Martin