jmenche
09-20-2007, 11:45 AM
Folks,
Here's some code that I have to print multiple worksheets.
Sub PrintScenario()
sheets(Array("# Of Items", "PV Allocation", "Premium", "Value", "Summary")).Select
sheets("Summary").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=True, Collate:= _
True
End Sub
My problem is that these sheets have protection and Worksheet_Activate routines that generate error messages when I run the code. However, this is the code that I recorded when I selected the sheets and hit the Print button! Can someone tell me what's the difference and what a possible workaround is. Maybe a SendKey to Print??
Thanks for your help. :beerchug:
Here's some code that I have to print multiple worksheets.
Sub PrintScenario()
sheets(Array("# Of Items", "PV Allocation", "Premium", "Value", "Summary")).Select
sheets("Summary").Activate
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Preview:=True, Collate:= _
True
End Sub
My problem is that these sheets have protection and Worksheet_Activate routines that generate error messages when I run the code. However, this is the code that I recorded when I selected the sheets and hit the Print button! Can someone tell me what's the difference and what a possible workaround is. Maybe a SendKey to Print??
Thanks for your help. :beerchug: