Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
using cells property
I am using excel 2003 and trying to print an area that will vary depending on
the number of players. Here is what I have now. Dim players As Long Dim pages As Long Dim rowcount As Long players = ActiveWorkbook.Sheets("week 1").Range("ad3").Value pages = (players / 3) rowcount = pages * 60 ActiveWorkbook.Sheets("individual stats").Range(Cells(2, 1), Cells(rowcount, 24)).PrintOut Copies:=1, Collate:=True I am getting "application-defined or object-defined error" with the last line highlighted. I checked the variable rowcount and it is correct. 900 in this case. When I substitute range("a2:x900") for range(cells(2,1),cells(rowcount,24)). It work great, but it will not always be row 900. It wil vary. Any help would be appreciated |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I use the .Cells property to refer to ActiveCell? | Excel Discussion (Misc queries) | |||
Merged cells Value2 property | Excel Programming | |||
cells property | Excel Programming | |||
How to use Cells property to Range object? | Excel Programming | |||
Using Select with Range.Cells property | Excel Programming |