How to catch Ctrl+P short or Pressing Print Button

  • Thread starter Thread starter RobertS
  • Start date Start date
R

RobertS

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
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top