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

Announcements
Note: You may notice some temporary visual or styling issues in the Community. Our vendor is actively investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
adiarnon
Creator III
Creator III

Change Variable in a Macro


HI,

I need to change a variable in onr of my macro's

what is the syntax tor that?

tnx

adi

1 Solution

Accepted Solutions
jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

SUB setVariable(varName, varValue)

set v = ActiveDocument.Variables(varName)

v.SetContent varValue, true

END SUB

Regards,

Jagan.

View solution in original post

2 Replies
jagan
Partner - Champion III
Partner - Champion III

Hi,

Check this thread hope it helps you.

Regards,

jagan.

jagan
Partner - Champion III
Partner - Champion III

Hi,

Try like this

SUB setVariable(varName, varValue)

set v = ActiveDocument.Variables(varName)

v.SetContent varValue, true

END SUB

Regards,

Jagan.