Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
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.

Tags (2)
1 Solution

Accepted Solutions
MVP
MVP

Re: Accessing document variables in a macro

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

Re: Accessing document variables in a macro

Check out API guide to access variables into Macro.

QlikView Core COM API Guide - Version 11

MVP
MVP

Re: Accessing document variables in a macro

You can access a particular variable like this:

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

View solution in original post

Not applicable

Re: Accessing document variables in a macro

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

MVP
MVP

Re: Accessing document variables in a macro

You still want to do this in a macro right?

Not applicable

Re: Accessing document variables in a macro

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