M
Mark Shirley
In MS Excel 2003
I am trying to write VBA code to programmatically
analyze a large spreadsheet I didn't create.
One of the worksheets has 24 combo boxes on it.
One of the first steps I need to accomplish is iteration over
those 24 combo boxes to pull out which cells their values are linked to.
The root of my problem seems to be that I don't understand what
kinds of objects the combo boxes are.
I've found the Worksheet.OLEObjects collection but it's count is only 1,
so they don't seem to be OLEObjects. (When I found the LinkedCell property
of an OLEObject, I thought I'd solved it, but there aren't enough
objects in that collection.)
I've found the worksheet.Shapes collection. It's count is 218, so maybe
they're shapes. But I don't see how to distinguish further. Their
TypeName is always "Shape". Their .Type property varies, but there
aren't 24 objects in the collection with any one Type. (By printing
the .Type properties out, I only see integer values, no symbolic information.)
When I right click on one of the Combo Boxes in design mode, I don't
see the Properties and View Code operations that are present for a
Combo Box that has been created from the Control Toolbox. There are
cut,copy,paste,grouping,order,assign macro, and format control options.
If I pick Format Control, I see
Size, Protection, Properties, Web, Control tabs
Under the Control tab, there are Input Range, Cell link, Drop down lines
pulldowns and a 3d shading checkbox.
I'm completely confused about what these Combo Boxes are. What
might they be and how can I write code that gets its 'hands' on them?
When I do, how will I be able to get an identifier for the linked cell?
Thank's in advance *very* much.
- Mark Shirley
I am trying to write VBA code to programmatically
analyze a large spreadsheet I didn't create.
One of the worksheets has 24 combo boxes on it.
One of the first steps I need to accomplish is iteration over
those 24 combo boxes to pull out which cells their values are linked to.
The root of my problem seems to be that I don't understand what
kinds of objects the combo boxes are.
I've found the Worksheet.OLEObjects collection but it's count is only 1,
so they don't seem to be OLEObjects. (When I found the LinkedCell property
of an OLEObject, I thought I'd solved it, but there aren't enough
objects in that collection.)
I've found the worksheet.Shapes collection. It's count is 218, so maybe
they're shapes. But I don't see how to distinguish further. Their
TypeName is always "Shape". Their .Type property varies, but there
aren't 24 objects in the collection with any one Type. (By printing
the .Type properties out, I only see integer values, no symbolic information.)
When I right click on one of the Combo Boxes in design mode, I don't
see the Properties and View Code operations that are present for a
Combo Box that has been created from the Control Toolbox. There are
cut,copy,paste,grouping,order,assign macro, and format control options.
If I pick Format Control, I see
Size, Protection, Properties, Web, Control tabs
Under the Control tab, there are Input Range, Cell link, Drop down lines
pulldowns and a 3d shading checkbox.
I'm completely confused about what these Combo Boxes are. What
might they be and how can I write code that gets its 'hands' on them?
When I do, how will I be able to get an identifier for the linked cell?
Thank's in advance *very* much.
- Mark Shirley