Call macro from active workbook
Try making a generic sub (which is the same in all workbooks) just to
capture the Ctrl+p and which then calls the "real" print macro in the
activeworkbook.
Sub PrintMeStarter()
Application.Run (ActiveWorkbook.Name & "!PrintMe")
End Sub
You'll have to handle catching an error if the active workbook doesn't have
a PrintMe() sub. Maybe just call the "regular" print in that case.
Tim.
"John" wrote in message
...
I may have 2 or 3 workbooks open, each has a custom print macro that is
activated with Ctrl-P. However, Ctrl P does not call the macro from the
active workbook. Seems like I read somewhere when there are duplicate
shortcut keys, Excel calls macros from workbooks in alphabetical order. How
can I force Excel to call the macro from the active workbook? Thank you.
|