Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I would like to create a macro (to be executed with a button) which sets the property "Max Visible Number" in the upper right corner of the Presentation Tab in the options of a bar diagram, on e.g. 10 or x+5 or something like that. Unfortunately I can't find specific information in the API Guide. Has perhaps someone experience with that? Thanks a lot in advance, Martin
Hi,
thanks a lot, it works perfect. 🙂
May I ask another question which was actually the idea before this? Would it be possible to enter a formula in the box next to the "Max Visible Number" which checks if the diagram is maximized, and sets the number of visible bars depending on that?
Regards,
Martin
Hi,
Here is the code
set chart = ActiveDocument.GetSheetObject("CH07")
set cp = chart.GetProperties
set dims = cp.Dimensions
if chart.IsMaximized then
dims(0).MaxNumShown.v = 9
else
dims(0).MaxNumShown.v = 3
end if
chart.SetProperties cp
Regards,
Kaushik Solanki
Hi,
Thanks for that. But I guess this is just macro-code, right? Can't I use it in a way that the number of bars is adjusted as soon as someone maximizes (or un-maximizes) the diagramm?
Thanks a lot,
Martin
HI,
No there are no action available for minimize and maximize.
Regards,
Kaushik Solanki
Ok, thank you.
Thank you two espically Kaushik Solanki for the solution of this problem, I have met this issue too.that waste me a lot of time since API Guide is wrong.
by the way,the damn official API Guide is super terrible, that should be called dictionary instead of guide.......not even a tiny progress since QV 7.0....that's a nightmare even for a expert of vb developer.