Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to catch Ctrl+P short or Pressing Print Button

Hi,

I need to control when user will press Print Button or press Ctrl + P
combination to run separate procedure which will Save Excell file in
some place on the drive. Can you help me with such problem? Will be
appreciate.

Best regards

Robert

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to catch Ctrl+P short or Pressing Print Button

Look at the BeforePrint event.

If you are not familiar with evens, see Chip Pearson's overview at
http://www.cpearson.com/excel/events.htm

--
Regards,
Tom Ogilvy

"RobertS" wrote in message
ups.com...
Hi,

I need to control when user will press Print Button or press Ctrl + P
combination to run separate procedure which will Save Excell file in
some place on the drive. Can you help me with such problem? Will be
appreciate.

Best regards

Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default How to catch Ctrl+P short or Pressing Print Button

In Thisworkbook module.........something like this?

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Application.DisplayAlerts = False
ActiveWorkbook.SaveCopyAs FileName:="C:\someplace\" & _
ActiveWorkbook.Name
' ActiveWorkbook.Save ' optional
Application.DisplayAlerts = True
End Sub


Gord Dibben MS Excel MVP

On 10 Feb 2007 14:43:52 -0800, "RobertS" wrote:

Hi,

I need to control when user will press Print Button or press Ctrl + P
combination to run separate procedure which will Save Excell file in
some place on the drive. Can you help me with such problem? Will be
appreciate.

Best regards

Robert


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
How do you reset the position that pressing CTRL-END moves you to? PeterB Excel Discussion (Misc queries) 2 October 10th 08 06:10 PM
Pressing ctrl (Excel - selecting cells) causes mouse to freeze..? Kelly Excel Discussion (Misc queries) 1 January 28th 06 11:11 PM
print different worksheet by pressing visible button on worksheet Confused Excel Worksheet Functions 2 June 13th 05 02:22 PM
Redefining the Ctrl [ and Ctrl ]s short cut with OnKey? John Wirt[_5_] Excel Programming 6 January 24th 05 05:46 AM


All times are GMT +1. The time now is 09:38 AM.

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"