Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

Changing a QlikView variable value through macro

Hi,

I have the following issue:

1. I have a QlikView Variable named "vRunMacro" with a value "false".

2. I have a macro that runs on opening the QVW file.

3. the macro has functions that run if vRunMacro=true. so, when a normal user open the file the functions don't run.

4. I run a batch file that opens the QVW and sends to vRunMacro the value "true".

5. everything runs perfetly.

now, I want to change the vRunMacro back to the value of "false",

can you please help?

I tried in many ways and could not see a change in variable overview when I look after the macro was performed...

Thanks!

Tags (3)
1 Solution

Accepted Solutions

Re: Changing a QlikView variable value through macro

Try this:

ActiveDocument.Variables("vRunMacro").SetContent "false", true

- Marcus

4 Replies

Re: Changing a QlikView variable value through macro

Try this:

ActiveDocument.Variables("vRunMacro").SetContent "false", true

- Marcus

Not applicable

Re: Changing a QlikView variable value through macro

I know, it should be that simple, right?

I added this line to my macro and it did not change the value...any advice?

Re: Changing a QlikView variable value through macro

Are you run your macro/batch from outside then you must also save your qvw.

- Marcus

Not applicable

Re: Changing a QlikView variable value through macro

thanks, this seems to be working thank you!

Community Browser