ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   message box program flow (https://www.excelbanter.com/excel-programming/274788-re-message-box-program-flow.html)

Chip Pearson

message box program flow
 
Steven,

Try something like

Dim Res As VbMsgBoxResult
Res = MsgBox("Message", vbYesNoCancel)
If Res = vbYes Then
' user clicked yes
ElseIf Res = vbNo Then
' user clicked no
Else
' user clicked cancel
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Steven Wathen" wrote in message
...

I`ve got a message box with the vbyesnocancel buttons on. How do

i make
my program go in different directions depending on the choice

made in
the message box. what value or constant changes when each

different
button is pressed??

*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!





All times are GMT +1. The time now is 03:20 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com