Print two different areas on a worksheet
I think I'd try something like this
Dim myRange As Range
Dim aWS As Worksheet
Set aWS = ActiveSheet
Set myRange = aWS.Range("$a$1:$l$64")
Debug.Print myRange.Address
myRange.PrintOut copies:=1, Collate:=True
Set myRange = aWS.Range("$a$651:$l$127")
myRange.PrintOut copies:=1, Collate:=True
I can't test it because I don't have a printer set up here.
--
HTH,
Barb Reinhardt
If this post was helpful to you, please click YES below.
"bigjim" wrote:
I'm using excel 2003 and want to print two different areas on a sheet. Here
is the code I'm using, but when I run it, it locks up sending an error report
to MS.
ActiveSheet.PageSetup.PrintArea = "$a$1:$l$64"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
ActiveSheet.PageSetup.PrintArea = ""
ActiveSheet.PageSetup.PrintArea = "$a$65:$l$127"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
|