Common Dialog - Cancel / Ok button pressed? 
Author Message
 Common Dialog - Cancel / Ok button pressed?

How can I test if the OK or Cancel button have been pressed under the File
option?
I need to do certain instructions when pressed OK and other when pressed
Cancel.

Thanx in advance
--
Reanie
:-D



Fri, 08 Oct 1999 03:00:00 GMT  
 Common Dialog - Cancel / Ok button pressed?

Quote:
> How can I test if the OK or Cancel button have been pressed under the File
> option?
> I need to do certain instructions when pressed OK and other when pressed
> Cancel.

Use the CancelError property. Code should look something like this"

  CommonDialog1.CancelError = True
  On Local Error GoTo CancelSave
  CommonDialog1.ShowSave

--
Get PR-Tracker -- Tracks problem reports (bugs, defects)
INFORMATION  http://www.halcyon.com/softwise/prtracker.html
DOWNLOAD     http://www.halcyon.com/softwise/download.html
TECH SUPPORT http://www.halcyon.com/softwise/TechSupport.html



Tue, 12 Oct 1999 03:00:00 GMT  
 Common Dialog - Cancel / Ok button pressed?


Quote:

> How can I test if the OK or Cancel button have been pressed under the File
> option?
> I need to do certain instructions when pressed OK and other when pressed
> Cancel.

> Thanx in advance
> --
> Reanie
> :-D


You can set the CancelError property to true and an error will be
generated if the user clicks cancel.

        - Chris Kyarsgaard
--
+----------------------------------------------------------------+
| Geronimo Development Corporation   Phone: (800) 457-6045       |
|   606 25th Ave. S., Suite 206       Fax: (320) 259-9808        |
|       St. Cloud, MN 56301       WWW: http://www.casefinder.com |
+----------------------------------------------------------------+



Tue, 12 Oct 1999 03:00:00 GMT  
 Common Dialog - Cancel / Ok button pressed?

Quote:

>> How can I test if the OK or Cancel button have been pressed under the File
>> option?
>> I need to do certain instructions when pressed OK and other when pressed
>> Cancel.

>> Thanx in advance
>> --
>> Reanie
>> :-D

>You can set the CancelError property to true and an error will be
>generated if the user clicks cancel.

Don't forget that you must also use the ON ERROR stmt to trap the return code
for the CANCEL button (32755) or the app will bomb.

Greg

Quote:

>        - Chris Kyarsgaard
>--
>+----------------------------------------------------------------+
>| Geronimo Development Corporation   Phone: (800) 457-6045       |
>|   606 25th Ave. S., Suite 206       Fax: (320) 259-9808        |
>|       St. Cloud, MN 56301       WWW: http://www.casefinder.com |
>+----------------------------------------------------------------+



Tue, 12 Oct 1999 03:00:00 GMT  
 Common Dialog - Cancel / Ok button pressed?

Thanx for the help - my test is working quite happily.
--
Reanie
:-D

Quote:
> How can I test if the OK or Cancel button have been pressed under the
File
> option?
> I need to do certain instructions when pressed OK and other when pressed
> Cancel.



Wed, 13 Oct 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Common Dialog - Cancel / Ok button pressed?

2. Which button of Common Dialog pressed?

3. Cancel Button on Common Dialog Box

4. VI : OK button on press Return KEY

5. simulate pressing OK button of MsgBox?

6. msgbox/alert with OK/CANCEL button passing to ASP

7. Ok buttom on Common Dialog

8. Common dialog cancel

9. Common Dialog ShowPrinter Cancel

10. Cancel error in Common Dialog Box

11. common dialog cancel

12. Problems with CANCEL buttuon in common dialog box

 

 
Powered by phpBB® Forum Software