Hello,
I'm using Excel 2003. I've created a personal.xls file to run every time Excel is opened. In personal.xls I have a macro that I want to run whenever someone hits the Print button in any workbook. I'm trying to change the printer that Excel will print to (but not the default printer of the computer).
This is in ThisWorkbook of personal.xls :
Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox "This is working!!" 'test to see if this runs
Application.activeprinter = "bsmt on Ne00:"
End Sub
The macro works but when I go to File-print in any other excel workbook it doesn't work. How do I get this to work for any Workbook that I open and not just personal.xls?
Thanks,
Peggy
I'm using Excel 2003. I've created a personal.xls file to run every time Excel is opened. In personal.xls I have a macro that I want to run whenever someone hits the Print button in any workbook. I'm trying to change the printer that Excel will print to (but not the default printer of the computer).
This is in ThisWorkbook of personal.xls :
Sub Workbook_BeforePrint(Cancel As Boolean)
MsgBox "This is working!!" 'test to see if this runs
Application.activeprinter = "bsmt on Ne00:"
End Sub
The macro works but when I go to File-print in any other excel workbook it doesn't work. How do I get this to work for any Workbook that I open and not just personal.xls?
Thanks,
Peggy