ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MsgBox (https://www.excelbanter.com/excel-programming/294526-re-msgbox.html)

Grey Newt

MsgBox
 
Try something like this....

Sub Display_Message(
Dim UserResp As VbMsgBoxResul
UserResp = MsgBox("Hi - please click a button", vbOKCancel, "Hi"
If UserResp = vbOK The
MsgBox ("You clicked OK"
ElseIf UserResp = vbCancel The
MsgBox ("You clicked Cancel"
End I
End Sub


All times are GMT +1. The time now is 02:58 PM.

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