Thread: select next
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
xlbo xlbo is offline
external usenet poster
 
Posts: 10
Default select next

The exact syntax will depend on the objects you are trying to llop through
but essentially you need a For Each..Next loop through the object collection
so

For each objectVariable in SheetRef.objectCollection
Process objectVariable
Next

so to iterate through the textboxes on a sheet, you would reference the
SHAPES collection:

For Each shp In ActiveSheet.Shapes
MsgBox shp.Name
Next
--
Rgds, Geoff




"BorisS" wrote:

I need for a macro to run and then have the next object selected. What is
the one line that will get me that "select next object in the sheet" code? I
don't want it to go through all of them, just to do the equivalent of
clicking on the next graph I have in number order.

Thx.
--
Boris