LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 79
Default slightly confused - object reference

i have code looking a little like this:

sub test()

dim sht as worksheet
dim cll as range

for each sht in thisworkbook.worksheets

<more code here

for each cll in sht.usedrange.columns(2).cells

sht.range(cll).select*

<code to do soething with selection

next cll

next sht


the problem is that the starred line is wrong, but i have tried everything
from sht.cll.select to sht.range("cll").select nothing works. I Just want to
select the cell so i can insert a row above it. Any help appreciated.

end sub
 
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
Using a string to set an object reference? Jeremy Excel Programming 2 January 3rd 07 02:02 PM
Confused about referencing multiple object code rows in other worksheets? slunk Excel Programming 2 February 28th 06 09:33 PM
Confused, again! Object variable not set? davegb Excel Programming 5 January 25th 06 03:25 PM
Get a reference to the last object pasted quartz[_2_] Excel Programming 6 January 13th 05 04:15 PM
How do I add a reference to an object library using VBA? GPDynamics Excel Programming 1 December 11th 04 12:36 AM


All times are GMT +1. The time now is 05:35 AM.

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"