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: 
Anonymous
Not applicable

MsgBox Error in Macro

In a macro I'm trying to use MsgBox function to determine if the user wants to continue with a process or not but it's returning a macro parse error. Is the following VBScript supported? If not, is there another method for evaluating user interaction?

vAnswer = MsgBox "Continue?",VBOKCancel
if vAnswer = 2 then
exit sub
end if

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You'll need parens (function style) around the arguments to return a value.

vAnswer = MsgBox("Continue?",VBOKCancel)

-Rob

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Sorry, I forgot to add that this is in version 9.0 SR2.

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

You'll need parens (function style) around the arguments to return a value.

vAnswer = MsgBox("Continue?",VBOKCancel)

-Rob

Anonymous
Not applicable
Author

Oh for crying out loud.......

I wish they were all that easy. LOL

BTW, Tech Support e-mailed me back and said that MsgBox is not supported in macros and I wouldn't be able to do this. Uh huh.