Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default XLDialog Printer Setup

We're calling Application.Dialogs
(xlDialogPrinterSetup).Show and want to test whether
the "Cancel" button was clicked by the user. How do we do
that?

Ron
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 811
Default XLDialog Printer Setup

"Ron Crapo" wrote in message
...
We're calling Application.Dialogs
(xlDialogPrinterSetup).Show and want to test whether
the "Cancel" button was clicked by the user. How do we do
that?


Hi Ron,

Here's one way:

Sub ShowPrinterDialog()
Dim bResult As Boolean
bResult = Application.Dialogs(xlDialogPrinterSetup).Show
If bResult Then
''' OK was clicked
Else
''' Cancel was clicked.
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 *



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default XLDialog Printer Setup

Hey, thanks Rob - that fix worked great!
Ron
-----Original Message-----
"Ron Crapo" wrote

in message
...
We're calling Application.Dialogs
(xlDialogPrinterSetup).Show and want to test whether
the "Cancel" button was clicked by the user. How do we

do
that?


Hi Ron,

Here's one way:

Sub ShowPrinterDialog()
Dim bResult As Boolean
bResult = Application.Dialogs

(xlDialogPrinterSetup).Show
If bResult Then
''' OK was clicked
Else
''' Cancel was clicked.
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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Printer Using USB Port Slows Page Setup Stu B Excel Discussion (Misc queries) 3 April 22nd 10 12:45 PM
launch page setup with no printer vall00 Excel Discussion (Misc queries) 2 February 16th 09 10:22 PM
Printing/printer setup re Excel David Brereton[_2_] Excel Discussion (Misc queries) 0 August 4th 08 01:49 PM
Printer Setup For Multiple sheets Ed Davis Excel Worksheet Functions 1 April 22nd 07 08:03 PM
Getting "printer not installed" when trying to edit page setup jac Excel Worksheet Functions 1 March 5th 05 07:19 PM


All times are GMT +1. The time now is 03:11 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"