ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Are you sure popup box (https://www.excelbanter.com/excel-programming/281984-you-sure-popup-box.html)

Todd Huttenstine[_2_]

Are you sure popup box
 
How do you get a simple little popup box or message to pop
up when you click a command button before the code runs?
I want the popup box to say something like "Are you sure"
and then give the user an option to click Yes or No, or
Cancel. If the user click no or cancel the code does not
run, if the user clicks Yes, the popup box goes away and
then the code run.

How do I do this?


Thanx

Todd Huttenstine

Chip Pearson

Are you sure popup box
 
Todd,

Use the MsgBox function. For example

If MsgBox("Are you sure?", vbYesNo) = vbNo Then
Exit Sub
End If

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



"Todd Huttenstine" wrote in message
...
How do you get a simple little popup box or message to pop
up when you click a command button before the code runs?
I want the popup box to say something like "Are you sure"
and then give the user an option to click Yes or No, or
Cancel. If the user click no or cancel the code does not
run, if the user clicks Yes, the popup box goes away and
then the code run.

How do I do this?


Thanx

Todd Huttenstine




Todd Huttenstine[_2_]

Are you sure popup box
 
Thanx, comes in very handy.
-----Original Message-----
Todd,

Use the MsgBox function. For example

If MsgBox("Are you sure?", vbYesNo) = vbNo Then
Exit Sub
End If

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



"Todd Huttenstine"

wrote in message
...
How do you get a simple little popup box or message to

pop
up when you click a command button before the code runs?
I want the popup box to say something like "Are you

sure"
and then give the user an option to click Yes or No, or
Cancel. If the user click no or cancel the code does

not
run, if the user clicks Yes, the popup box goes away and
then the code run.

How do I do this?


Thanx

Todd Huttenstine



.



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

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