ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   'ALT' + P for print preview (https://www.excelbanter.com/excel-discussion-misc-queries/125647-alt-p-print-preview.html)

Ben

'ALT' + P for print preview
 
How can I make a keyboard shortcut to get to the print preview screen by
pressing ALT + P?



Jim Rech

'ALT' + P for print preview
 
You'd need to create a routine that does a print preview and create/run
another to make Alt-p run it.

Sub AltP()
ActiveSheet.PrintPreview
End Sub

''Run this from Auto_Open or whenever you want Alt-p to do a preview
Sub TrapAltP()
Application.OnKey "%p", "AltP"
End Sub

Sub ReleaseAltP()
Application.OnKey "%p"
End Sub



--
Jim
"Ben" wrote in message
...
| How can I make a keyboard shortcut to get to the print preview screen by
| pressing ALT + P?
|
|




All times are GMT +1. The time now is 07:12 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com