ChuckRush
asked on
Modal Window Response
Is there a way to act on the response from a model window? I want to fire a subroutine if the repsonse is 'OK' and bypass one it is 'Cancel.
Certainly:
Dim Msg As Long
Msg = MsgBox("Prompt", vbOKCancel, "Title")
If Msg = vbOK Then
'do something
Else
'do something else
End If
It's pretty much just one line of code ....
If MsgBox("Prompt", vbOKCancel, "Title") = vbOk Then Call YourFunctionName ()
mx
If MsgBox("Prompt", vbOKCancel, "Title") = vbOk Then Call YourFunctionName ()
mx
ASKER
Ty I understandx thaT but I am wanting to act on the response in the window that called the modal window
MX and I show how to do just that. Where is it that you're getting hung up?
<patrick ... did you end up buying a book?>
mx
mx
Yes, I did. Will update that later :)
Curious to know which book ... stopping by another B&N later today.
Summit ?
Summit ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks I got to that myself -- sort of had a brain shutdown
ChuckRush
What does that have to do with the MsgBox ?
mx
What does that have to do with the MsgBox ?
mx
>>Summit ?
Of course :)
Of course :)
Dim confirm As VbMsgBoxResult
confirm = MsgBox("Are you sure you want to do that?", vbYesNo, "Message goes here")
If confirm = 6 Then
'Run Subroutine here Else
Else
'Do something else here
End If