Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Determining which Print Button was clicked

Hi,

I'm using the Application WorkbookBeforePrint Event to hijack the normal
Print and Print Preview functions in Excel 2003 & display some customised
options. How do I determine whether the user clicked the Print button or the
Print Preview button?

thanks,
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 69
Default Determining which Print Button was clicked

On Aug 15, 11:12*am, Reggie wrote:
Hi,

I'm using the Application WorkbookBeforePrint Event to hijack the normal
Print and Print Preview functions in Excel 2003 & display some customised
options. *How do I determine whether the user clicked the Print button or the
Print Preview button?

thanks,


As far as I know you are unable to. There are at least a couple of
workarounds though...

1) Put a print button on your worksheet and control everything from
there. (by far the simplest, just need to educate the users...)
2) Manipulate the toolbar and replace the standard print and print
preview buttons with your own code, you would then need to reset them
upon closing your workbook.

James
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Determining which Print Button was clicked

Hi James,

thankyou for your response.

I beileve we should be able to determine the button that is clicked by
examining the "state" property of the clicked control, but it appears it is
not being set correctly by Excel. When I look at the property it says
msobuttonup when in fact it is msobuttondown.

I'm still looking into this & will advise what I find.

Would any MVP's out there care to comment on this...

cheers,

Gregory

" wrote:

On Aug 15, 11:12 am, Reggie wrote:
Hi,

I'm using the Application WorkbookBeforePrint Event to hijack the normal
Print and Print Preview functions in Excel 2003 & display some customised
options. How do I determine whether the user clicked the Print button or the
Print Preview button?

thanks,


As far as I know you are unable to. There are at least a couple of
workarounds though...

1) Put a print button on your worksheet and control everything from
there. (by far the simplest, just need to educate the users...)
2) Manipulate the toolbar and replace the standard print and print
preview buttons with your own code, you would then need to reset them
upon closing your workbook.

James

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
Do until button clicked kaiser Excel Programming 3 August 31st 05 12:41 PM
Identifying Button Clicked Tom Ogilvy Excel Programming 0 July 23rd 04 06:38 PM
Identifying Button Clicked Chip Pearson Excel Programming 0 July 23rd 04 06:29 PM
Pause macro, add form button to sheet, continue macro when button clicked! Flystar[_15_] Excel Programming 1 May 26th 04 09:45 AM
How do I check if a user clicked the Print Cancel button joanne Excel Programming 0 September 5th 03 08:24 AM


All times are GMT +1. The time now is 02:13 PM.

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

About Us

"It's about Microsoft Excel"