Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do you reset the position that pressing CTRL-END moves you to? | Excel Discussion (Misc queries) | |||
Pressing ctrl (Excel - selecting cells) causes mouse to freeze..? | Excel Discussion (Misc queries) | |||
print different worksheet by pressing visible button on worksheet | Excel Worksheet Functions | |||
Redefining the Ctrl [ and Ctrl ]s short cut with OnKey? | Excel Programming |