Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Creating a multiple choice message box with macro

Hi I've just created a message box in Edit Module dialog in QV.

sub DisplayMessage

msgbox "text"

end sub

Very Simple script and i Exucute it by pushing a button in QV.

But Now to my question; I Want, in the box that's diplayed for the user, to have two chioses. Simply "Yes" and "No". So the user can decide whether if hi/she wants to exicute the export, in this matter, or not. As it is now You can only click "OK".

Someone got any ideas?

1 Solution

Accepted Solutions
biester
Specialist
Specialist

That's not so much a QlikView problem, it's VBScript. Just use the parameters of the MsgBox-Function, e.g.:

Sub DisplayMessage
'this displays a Yes / No message box
Answer = MsgBox("Do it or not?",4,"Title")
If (Answer=6) Then
..........
Else
........
End If
End Sub

A documentation of MsgBox can e. g. be found here: http://www.w3schools.com/VBScript/func_msgbox.asp

Rgds,
Joachim

View solution in original post

1 Reply
biester
Specialist
Specialist

That's not so much a QlikView problem, it's VBScript. Just use the parameters of the MsgBox-Function, e.g.:

Sub DisplayMessage
'this displays a Yes / No message box
Answer = MsgBox("Do it or not?",4,"Title")
If (Answer=6) Then
..........
Else
........
End If
End Sub

A documentation of MsgBox can e. g. be found here: http://www.w3schools.com/VBScript/func_msgbox.asp

Rgds,
Joachim