Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
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!

1 Solution

Accepted Solutions
marcus_sommer

Try this:

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

- Marcus

View solution in original post

4 Replies
marcus_sommer

Try this:

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

- Marcus

Not applicable
Author

I know, it should be that simple, right?

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

marcus_sommer

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

- Marcus

Not applicable
Author

thanks, this seems to be working thank you!