
Not applicable
2014-05-06
02:19 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Macro to show vbYesNo Message box, and then triggering actions based on whether user selects Yes or No
Hi.
I have this so far:
sub MsgBoxTest()
dim Message1
set Message1 = MsgBox("Do you want to save current selections?", vbYesNoCancel)
end sub
How do I write the VB Script to continue on to do this:
If user selects yes, - Trigger some action (e.g. save current selections to a bookmark, BM01)
If user selects no or cancel - Don't do anything
Thanks for your help!
3,369 Views
2 Replies

Not applicable
2014-05-06
03:53 AM
Author
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
sub MsgBoxTest()
dim Message1
set Message1 = MsgBox("Do you want to save current selections?", vbYesNoCancel)
If Message1 = vbYes then
Action1
Else
Action2
End if
end sub


Master II
2014-05-06
08:05 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
