Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
OLE Objects [email protected] Excel Discussion (Misc queries) 0 March 7th 08 09:44 PM
using the address properties from range objects in a sum formula JEFFWI Excel Discussion (Misc queries) 2 September 11th 07 05:36 AM
Imported objects aehan Excel Discussion (Misc queries) 1 January 25th 05 01:25 PM
VBA Objects Kevin Excel Discussion (Misc queries) 8 January 1st 05 09:07 PM
Cannot use range objects jason Excel Programming 7 November 27th 03 03:00 AM


All times are GMT +1. The time now is 02:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"