Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Accessing document variables in a macro

I have some variables on my sheet which I want to use in my VBScript. How can I go about doing this?

Thanks,

T.

1 Solution

Accepted Solutions
petter
Partner - Champion III
Partner - Champion III

You can access a particular variable like this:

Set Test = Activedocument.Variables("Test")
MsgBox Test.GetContent.String

View solution in original post

5 Replies
Not applicable
Author

Check out API guide to access variables into Macro.

QlikView Core COM API Guide - Version 11

petter
Partner - Champion III
Partner - Champion III

You can access a particular variable like this:

Set Test = Activedocument.Variables("Test")
MsgBox Test.GetContent.String
Not applicable
Author

Hi Petter,

Is there a way to get the dimension that is being used as an axis in a chart? E.g. if I had Date as one of my dimensions could I swap that dimension with the other dimension i.e. swapping the X with the Y axis.

Thanks,

T

petter
Partner - Champion III
Partner - Champion III

You still want to do this in a macro right?

Not applicable
Author

Yeah ideally, currently what I have is a chart where the dimensions are defined by the user by using conditional expressions however I'm finding that sometimes the chart may look better if the axis are swapped. I currently have a button that does not trigger anything but I was thinking that it can be used to call a VBA module that swaps the axis.

Thanks,

T