PDA

View Full Version : Solved: PRINT AREA VBA



gimli
06-09-2010, 09:49 AM
Hi yas,

Got some code here. Trying to print SHANNON range A1:43 but that wont print. Sheet AMANDA prints out ok.

Any ideas to fix?

Thanks




Sub TP()
Sheets("SHANNON").Select
Range("A1:H43").Select
Sheets("AMANDA").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End Sub

Bob Phillips
06-09-2010, 09:58 AM
Try



Sheets(Array("SHANNON", "AMANDA")).Select
Range("A1:H42").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

gimli
06-09-2010, 10:15 AM
XLD,

That code prints out the full sheets SHANNON and AMNADA.

What I need is sheet SHANNON to print cell range of A1:A43 and AMANDA to print the full sheet.

Bob Phillips
06-09-2010, 10:22 AM
Sub TP()
Sheets("SHANNON").Select
ActiveSheet.PageSetup.PrintArea = "$A$1:$H$43"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("AMANDA").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True

End Sub

gimli
06-09-2010, 10:30 AM
Perfectamundo!!

thanks!!