Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range objects (?)
Hello,
I have been having trouble defining a range of cells when using objects. (If I am right, the counting cell is my object) I have tried different approaches, but the code below shows my latest failed attempt. How do you specify a range of cells when you are using an object? Here is my code: Dim numberrow as long Dim countingcell as object numberrow = 5 Set countingcell = range("n4") For cellcount = 0 to numberrow If countingcell.offset(cellcount,0) = True Then Worksheets("Sheets2").Range(Cells(cellcount,-3), Cells (cellcount, -13)).select etc.... Thanks Bill |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range objects (?)
Dim numberrow as long
Dim countingcell as Range Dim cellcount as Long numberrow = 5 Set countingcell = range("n4") For cellcount = 0 to numberrow If countingcell.offset(cellcount,0) = True Then countingCell.Offset(cellCount,-13).Resize(1,10).Select msgbox "Take a look, click to continue . . . " End if -- Regards, Tom Ogilvy "Bill" wrote in message ... Hello, I have been having trouble defining a range of cells when using objects. (If I am right, the counting cell is my object) I have tried different approaches, but the code below shows my latest failed attempt. How do you specify a range of cells when you are using an object? Here is my code: Dim numberrow as long Dim countingcell as object numberrow = 5 Set countingcell = range("n4") For cellcount = 0 to numberrow If countingcell.offset(cellcount,0) = True Then Worksheets("Sheets2").Range(Cells(cellcount,-3), Cells (cellcount, -13)).select etc.... Thanks Bill |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
OLE Objects | Excel Discussion (Misc queries) | |||
using the address properties from range objects in a sum formula | Excel Discussion (Misc queries) | |||
Imported objects | Excel Discussion (Misc queries) | |||
VBA Objects | Excel Discussion (Misc queries) | |||
Cannot use range objects | Excel Programming |