PDA

View Full Version : [SOLVED] All possible ouputs of TypeName(Selection)?



wene
03-24-2005, 06:34 AM
I figured out that there exist at least those outputs/types of selection, via try and find:

- Range
- several chart 'areas' (which i catch with asking If ActiveChart Is Nothing)
- pictures
- OLEObjects

But, where or how do I get a complete list of type names of selections?

Killian
03-24-2005, 08:27 AM
If we're talking about the Selection object in Excel, then a complete list will be any Excel object that has the "Select" method, so I just copied this from the "Applies to.." list for the Select method in Excel help:

Axis Object
AxisTitle Object
Chart Object
ChartArea Object
ChartObject Object
ChartObjects Collection Object
Charts Collection
ChartTitle Object
Corners Object
DataLabel Object
DataLabels Collection Object
DataTable Object
DisplayUnitLabel Object
DownBars Object
DropLines Object
ErrorBars Object
Floor Object
Gridlines Object
HiLoLines Object
LeaderLines Object
Legend Object
LegendEntry Object
LegendKey Object
OLEObject Object
OLEObjects Collection Object
PlotArea Object
Point Object
Range Collection
Series Object
SeriesLines Object
Shape Object
ShapeRange Collection
Sheets Collection Object
TickLabels Object
Trendline Object
UpBars Object
Walls Object
Worksheet Object
Worksheets Collection

If you are dealing with something a user has selected, you can probably eliminate the collections and just deal with the individual objects.
For all of these, TypeName will return the object type as a string, which I think match the list above i.e. With an AxisTitle Object selected, it will return "AxisTitle"

Paleo
03-24-2005, 08:30 AM
Hi wene,

you find that at the excel object model and you can find this among many other interesting things at http://www.mugrs.org, once you there look for "Office Events" at the left panel.