Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MS Common Dialog

Status
Not open for further replies.

KoenPiller

Programmer
Apr 4, 2001
270
NL
Hi,

I am puzzled with the Active X msComDlg Common Dialog. Is does not save
I have this form with a btnSave. In the Clickprocedure following code:
Code:
WITH ThisForm
.oleCommSelect.FileName = “myFile.txt” 
.oleCommSelect.Defaultext = “txt”
.oleCommSelect.ShowSave()
ENDWITH
It shows the ms common dialog window, you can select, an other directory, but nothing is saved.
When I than activate the Windows search I find that myFile.txt is listed in the directory I had selected however as an Explorer shortcut and indeed physically it is not in the directory I would have expect it to be.

Obviously I am doing something wrong, any idea where what to correct?

Thanks

Koen
 
Keon

I believe that the common Dialog simulates Open/Save actions, but you alos have to code the actual action. Take a look at PUTFILE() in the help file to save it.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi,

This is a clear case of haye in my brains: the coding is perfect but lacking of the essential instruction to do the actual "copy file to".
Added that (inclusive all kinds of error handlings) and all works as it should.
Thanks for moral support.

Koen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top