View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Bert[_2_] Bert[_2_] is offline
external usenet poster
 
Posts: 13
Default referencing commandbuttons as OLEObjects

I want to be able to manipulate and get information about a large number of
commandbuttons using something like:
x = Worksheets(2).OLEObjects.Count
For b = 1 To x
xx = Worksheets(2).OLEObjects.Item(b).BackColor
Next b
This generates a error. (Although xx =
Worksheets(2).OLEObjects.Item(b).Name does not)
The only objects in the OLEObjects collection are commandbuttons.
How can I make this work?
Thanks.