View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
OssieMac OssieMac is offline
external usenet poster
 
Posts: 2,510
Default using cells property

You would have found it would work if the active sheet. When you use Cells
you must specify the worksheet or excel thinks you are referring to the
active sheet.

You can either use
Sheets("individual stats").Range(Sheets("individual stats").Cells(2, 1), etc

or better to use With / End with like the following. Note the dot in front
of cells.

Note also that a space and underscore at the end of a line is a line break
in an otherwise single line of code.

With ActiveWorkbook.Sheets("individual stats")
.Range(.Cells(2, 1), _
.Cells(RowCount, 24)) _
.PrintOut Copies:=1, Collate:=True
End With

--
Regards,

OssieMac