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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Print variable value to msgbox

Hi,

I created a macro where i get a value from textbox to created variable. But if print it to msgbox i get an empty value though in variable overview i see that my variable get a value

what do i do wrong?

set Psum=ActiveDocument.GetSheetObject( "TX01" )

ActiveDocument.Variables("vPsum").SetContent Psum.GetText, true

suma=vPsum

msgbox("Sum is " &suma)

Thanks

1 Solution

Accepted Solutions
m_woolf
Master II
Master II

Store the value in a vb variable something like this:

set Psum=ActiveDocument.GetSheetObject( "TX01" )

strAmt = Psum.GetText

ActiveDocument.Variables("vPsum").SetContent strAmt, true

msgbox("Sum is " & strAmt)

View solution in original post

2 Replies
m_woolf
Master II
Master II

Store the value in a vb variable something like this:

set Psum=ActiveDocument.GetSheetObject( "TX01" )

strAmt = Psum.GetText

ActiveDocument.Variables("vPsum").SetContent strAmt, true

msgbox("Sum is " & strAmt)

Not applicable
Author

Hi,

Thanks it did the trick.

I wonder if it is possible to achieve the same result without using a variable vPsum just somehow get the object value straight in code