Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team -
Has anyone come across a function to determine which chart type we are on? Something like =ChartType('Object ID')
Best,
Sunny
Possibly by Macro?
Do you have a code which can be used?
What is the use case here? Can't we know the chart type by simply looking at the chart?
Hi.
I have found suitable function in API Guid.qvw. We can create macro:
Sub GetTypeObject()
SET varObject = ActiveDocument.getsheetobject("BU03")
MsgBox(varObject.GetObjectType)
End sub
then we can connect macro with button
returning code shows type of object:
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
I hope it is useful.
So lets say if I use fast change to switch between straight table and pivot table. When on straight table, I want to use one dimension and when on pivot table, I would like to see 2 dimensions.
Maybe have a look at topic 31:
Hahaha it was just a google search away. I will test it out
I guess the issue will be how to trigger that macro
I am planning to play around with it. I will respond back if I find a way to do it