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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Assigning an expression value to a variabe in macros

HI

I am having a problem in Assigning an expression value to a variabe in macros..

This is my script



Sub ShowPoPUp

ActiveDocument.Variables(

"MyBudget").Setcontent "7000", true

if

MyBudget<8000 then



MsgBox



(MyBudget)

end

if

end

Sub

I want that Msgbox must print the value which is in MyBudget which is 7000.but when i m running this script ,the msgbox prints nothing .means a msg box with no value.. help me out .Thank u soo much

Regards

Sikandar











1 Solution

Accepted Solutions
Not applicable
Author

Sikandar,

You need to retrieve the value:

ActiveDocument.Variables("MyBudget").GetContent.String

Regards,

Gordon

View solution in original post

2 Replies
Not applicable
Author

Sikandar,

You need to retrieve the value:

ActiveDocument.Variables("MyBudget").GetContent.String

Regards,

Gordon

Not applicable
Author

HI

Thank u soo much Gordon.i have one another question.i want a msgvbox to appear which ask me "DO i want to go on the next sheet "if i click on Yes .it

must go on the next sheet .and i click on No it must stay on the same sheet.....any solution for this will be help fullll.Thank u soo much

Regrads

Sikandar.