|
-
Nov 4th, 2002, 01:32 PM
#1
Thread Starter
Member
message box problem
I have a YesNo message box.
If the user clicks 'Yes', it should proceed to open my exe.
If the user clicks 'No', the message box should close and disappear.
However, regardless of whether the user click Yes or No, it opens my exe. How can I solve this? My code is:
If Check1.Value = true Then
MsgBox "Do you want to proceed?", vbYesNo, "My exe"
End If
Shell ("My exe.exe")
End Sub
Thanks for any help.
-
Nov 4th, 2002, 01:52 PM
#2
You need to check the return value of MsgBox. I think it returns either vbYes or vbNo
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Nov 4th, 2002, 01:57 PM
#3
Try this:
Dim Title as String, Msg as String
Dim Reply as Integer, Flags as Integer
Title = "Open .exe ?"
Msg "Do you want to start the app?"
Flags = vbYESNO + vbQUESTION
Reply = MsgBox(Msg, Flags, Title)
If Reply = vbYes Then
Shell ("My exe.exe")
Else
End
End if
Post again if this don't work.....
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|