Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
i'm using the GetObjectType method to list all objects in a sheet with a description of their type.
The problem is it is a number and i can't find the reference list in any document. I have started listing all types by testing all kind of objects but an exhasutive list would save me time and maybe help other people
Thanks
Could not agree more!
Here's my attempt:
List box | 1 |
Multi Box | 2 |
Stats box | 3 |
Table Box | 4 |
Button | 5 |
Text Object | 6 |
Current Selections | 7 |
Input Box | 8 |
Line | 9 |
Pivot Table | 10 |
Straight Table | 11 |
Bar Chart | 12 |
Pie Chart | 13 |
Scatter Chart | 14 |
Line Chart | 15 |
Combo Chart | 16 |
Custom Object | 17 |
Bookmark Object | 18 |
Grid Chart | 20 |
Radar Chart | 21 |
Gauge Chart | 22 |
Block Chart | 27 |
Funnel Chart | 28 |
Search Object | 31 |
Slider Object | 34 |
Calendar Object | 35 |
Container | 36 |
Mekko Chart | 37 |
Couldn't vouch for it's exhaustiveness...
By the way, here's the macro VBScript that I used:
Function ObjTypes
dim res
res = "Results:"
set s = ActiveDocument.ActiveSheet
for i = 0 to s.NoOfSheetObjects-1
set obj = s.SheetObjects(i)
res = res & vbcrlf & obj.GetCaption.Name.v & ":" & obj.GetObjectType
next
ObjTypes = res
End Function
Then I created a sheet with one of everything.
Hi
The reference information is documented in the API guide (qvw model) that is bundled with a full install (in the documentation folder).
Returns code for sheet object type
0=Unknown
1=List Box
2=Multi Box
3=Statistics Box
4=Table Box
5=Button
6=Text Object
7=Current Selections Box
8=Input Box
9=Line/Arrow Object
10=Pivot Table
11=Straight Table
12=Bar Chart
13=Pie Chart
14=Scatter Chart
15=Line Chart
16=Combo Chart
17=Custom Object
18=Bookmark Object
19=Slider/Calendar Object
20=Grid Chart
21=Radar Chart
22=Gauge Chart
23=Chart Derived
24=Sheet
25=Tabrow
26=Document
27=Block Chart
28=Funnel Chart
29=Internal Layout
30=Inter Sheet Transfer
31=Search Object
32=Bookmark
33=Report
34=Slider
35=Calendar
From V10 API guide
Regards
Jonathan