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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
rein_nigul
Contributor
Contributor

VB function not work

Can anyone tell me why is the function in response to the "wrong"


Function test

vbPRoductID=5
set v = ActiveDocument.Variables("vbPRoductID")
v.SetContent vbPRoductID,true 

set v = ActiveDocument.Variables("vbPRoductID")
vPRoductID = v.GetContent.string

msgbox(vbPRoductID)
msgbox(vPRoductID)


if vbPRoductID=vPRoductID then
      msgbox=("Right")
else
      msgbox("Wrong")
end if
end function
 

 

Rein

Labels (1)
1 Solution

Accepted Solutions
tresB
Champion III
Champion III

Try like:

if trim(vbPRoductID)=trim(vPRoductID) then

      msgbox("Right")                                               ''''' typo '=' removed

else

      msgbox("Wrong")

end if

View solution in original post

1 Reply
tresB
Champion III
Champion III

Try like:

if trim(vbPRoductID)=trim(vPRoductID) then

      msgbox("Right")                                               ''''' typo '=' removed

else

      msgbox("Wrong")

end if