Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All
In the below macro script instead of passing the GetSheetObject manually(CH05) how can I pass the GetSheetObject dynamically? Please help me out! It is little urgent
set chart=ActiveDocument.GetSheetObject("CH05")
Thanks
Attitude
Hi,
Please look at this thread. If you still need help then please paste full code with explanation.
Cheers - DV
Hi All
In the below macro code can anyone help me out to pass GetSheetObject dynamically instead of hardcoding it("CH06"). This is really urgent! Hope some one can help me out on this.
set chart=ActiveDocument.GetSheetObject("CH06")
set Prop = chart.GetProperties
set vars = Prop.Dimensions
for i = 0 to vars.Count-1
vars.Item(i).SortCriteria.SortByAscii = 0
vars.Item(i).SortCriteria.SortByLoadOrder = 1
next
chart.SetProperties Prop
Thanks
Attitude
Hi ,
Try this macro .
MyCharts=MySheet.GetSheetObjects
For X =lbound(MyCharts) to ubound(MyCharts)
ActiveDocument.Sheets(i).Activate
msgbox("Chart: " & MyCharts(X).GetObjectId)
set chart=ActiveDocument.GetSheetObject(
MyCharts(X).GetObjectId)
set Prop = chart.GetProperties
set vars = Prop.Dimensions
for i = 0 to vars.Count-1
vars.Item(i).SortCriteria.SortByAscii = 0
vars.Item(i).SortCriteria.SortByLoadOrder = 1
next
next
chart.SetProperties Prop