Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm using "Application.Dialogs(xlDialogPrinterSetup).Sho w"
and am not sure on how to test if the "Ok" or "Cancel" button is pressed. If the EndUser selects "Ok" the run some code if "Cancel" is selected then End. Thanks, John |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
"John" wrote in message
... I'm using "Application.Dialogs(xlDialogPrinterSetup).Sho w" and am not sure on how to test if the "Ok" or "Cancel" button is pressed. If the EndUser selects "Ok" the run some code if "Cancel" is selected then End. Hi John, Here's one way to do it: Sub ShowPrinterSetup() Dim bResult As Boolean bResult = Application.Dialogs(xlDialogPrinterSetup).Show If bResult Then ''' User clicked OK Else ''' User clicked Cancel End If End Sub -- Rob Bovey, MCSE, MCSD, Excel MVP Application Professionals http://www.appspro.com/ * Please post all replies to this newsgroup * * I delete all unsolicited e-mail responses * |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
2007 Form Control/ActiveX Control font difference | Excel Discussion (Misc queries) | |||
Excel spin box - no Control tab in Format Control dialong box | Excel Worksheet Functions | |||
Format Control dialog box control tab | Excel Discussion (Misc queries) | |||
How to delete the "Insert Function Dialog Box" (dialog box only)? | Excel Worksheet Functions | |||
Scroll Bar missing "Control" tab in "Format Properties" dialog box | Excel Discussion (Misc queries) |