common dialog control

F

Fredrated

Does anyone know how to tell when a user selectes 'cancel' in the common
dialog control?
I can't find a property or method that seems to reference which button the
user selected

Thanks

Fred
 
D

Dirk Goldgar

Fredrated said:
Does anyone know how to tell when a user selectes 'cancel' in the
common dialog control?
I can't find a property or method that seems to reference which
button the user selected

I'd suggest you not use the Common Dialog Control if you can call the
Windows API directly, using code you'll find posted here:

http://www.mvps.org/access/api/api0001.htm
Call the standard Windows File Open/Save dialog box

http://www.mvps.org/access/api/api0002.htm
BrowseFolder Dialog

When you use these functions to call the Windows API, you get an empty
string back if the user clicked the Cancel button. My guess would be
that the Common Dialog Control does the same, but I don't really know.
 
K

Klatuu

Yes, Dirk, the ActiveX version does return an empty string. I used it --
Once -- six years ago.
 
Top