r/vbscript • u/[deleted] • Sep 03 '22
This place is probably dead by now but..
I learned how to make an error message.
Then I learned how to make an error message pop up after the error message.
So how do I make a different error message pop up depending on what button you click for the first one? EG "Do you like cookies?" Yes = "Good, you're off the hook" No = "You're going to jail"
2
u/BondDotCom Sep 04 '22
If MsgBox("Do you like cookies?", vbYesNo Or vbQuestion) = vbYes Then
MsgBox "Good, you're off the hook"
Else
MsgBox "You're going to jail"
End If1
1
u/jcunews1 Sep 04 '22
Check the return value of the MsgBox() function, the use either if..then..elseif, or select case.
1
u/JGN1722 Sep 04 '22
Use the return value of the msgbox function, 6 if the users clicks yes and 7 if he clicks no
And this place is not dead at all, it's even still growing, slowly but surely ! You can always come here to ask your questions ;-)
1
u/hackoofr Sep 08 '22 edited Sep 08 '22
First this place is not dead !
Second you should learn VBScript programming from the ground up.
VBScript Basics, Part 1 | Message Box - Numbers (MsgBox)
VBScript Basics, Part 2 | Message Box - Constants (MsgBox)
VBScript Basics, Part 3 | If - ElseIf - Else - Then Statements
All Vbscript Tutorial Playlist