Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

For Loop

Status
Not open for further replies.
Jul 12, 2003
18
US
I'm trying to loop through shapes on a worksheet. These Shapes happen to be check boxes. I can call them by name as in this example.

Code:
ActiveSheet.Shapes("CB20_DTS").Select

But what I wanted to do is use the FOR LOOP but I can't seem to find the right wording.
This example doesn't work.

Code:
For Each Shape on Worksheet
   "do something here"
Next Shape
Can you correct the statement above?

 
Dim Sh as Shape
...
for each Sh in activesheet.shapes
...
next Sh



Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top