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

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
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

Labels (1)
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.