Archive of Mr Excel Message Board
Sub PrintGroup1()
Dim Range1 As Range
Dim sheetname As Worksheet
Set sheetname = Worksheets("GROUP")
Set Range1 = sheetname.Range("GROUP")
sheetname.Select
Range("GROUP").Select
With sheetname.PageSetup
.PrintTitleRows = "$1:$10"
.PrintTitleColumns = "$A:$C"
.PrintArea = Range1
End With
sheetname.PrintOut Copies:=1, Preview:=True, Collate:= _
True
End Sub
I keep getting a error message when I try and run the code.

ActiveSheet.PageSetup.PrintArea = "Range"
If not, then it looks like you are trying to name the worksheet to Group. You can use:
Sheets("Sheet1").Name = "Group"
Your code looks like you are trying to create a print range for the entire sheet. Is this correct? This would be a lot to print.
With sheetname.PageSetup .PrintTitleRows = "$1:$10" .PrintTitleColumns = "$A:$C" .PrintArea = Range1 End With
