Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
In the attached chart I am trying to figure out how to set the scrollbar to default to the right.
How do you enable or insert a macro such as:
sub OneOff
set chart = ActiveDocument.GetSheetObject("CH23")
set p = chart.GetProperties
p.ChartProperties.XScrollInitRight = true
chart.SetProperties p
end sub
spb wrote:
Can you attach an example. I tried to follow and it move the scroll bar to the left.
Settings -> Document Properties -> Triggers -> Document Event Triggers -> OnOpen -> Add Action(s)... -> Add -> External -> Run Macro -> OK -> Macro Name = OneOff -> OK -> OK -> Save -> Close -> Reopen the document
John,
Can you attach an example. I tried to follow and it move the scroll bar to the left.
spb wrote:
Can you attach an example. I tried to follow and it move the scroll bar to the left.
Thank you John.
Hi John,
It works fine with bar charts and other charts .But If I select Pivot table pie chart then it will not work...Can you please suggest something for Pivot table.
I have just converted your attachement graph to pivot table for example.
thanks in advance .
Gyan
really helpful..
but how to apply to all chart?
many thx,i never do macro before
Rendi: You need to identify all the chart objects in the macro. Example below IDs three separate charts:
sub ScrollRt
set chart1 = ActiveDocument.GetSheetObject("CH03")
set chart2 = ActiveDocument.GetSheetObject("CH07")
set chart3 = ActiveDocument.GetSheetObject("CH09")
set p1 = chart1.GetProperties
set p2 = chart2.GetProperties
set p3 = chart3.GetProperties
p1.ChartProperties.XScrollInitRight = true
p2.ChartProperties.XScrollInitRight = true
p3.ChartProperties.XScrollInitRight = true
chart1.SetProperties p1
chart2.SetProperties p2
chart3.SetProperties p3
end sub
John will it work for the Pivot table
Hi,
I have been searching for a way to run a macro for setting specified chart object scrollbars to the far-right, by default. I found a VB solution for this yesterday, as below:
sub ScrollRight
set chart1 = ActiveDocument.GetSheetObject("1234")
set p1 = chart1.GetProperties
p1.ChartProperties.XScrollInitRight = true
chart1.SetProperties p1
end sub
This worked fine for this app and works great.
However, I am now working on another of my apps and want to do the same thing again, but I already have a jscript macro within the app. I am wondering; would there be a way to convert the VB script (above) to jscript, so I can also use it in this other app? I have to keep the existing jscript macro, so getting rid of that and switching to VB is not an option.
I am confused as to why QlikView doesn't allow you to have separate macros, rather than the single script layout that's there is. That way it would be possible to have different macros running different languages.
Any help much appreciated.