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 |
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 |
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 |
All times are GMT +1. The time now is 07:28 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com