ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Customize options in a MsgBox (https://www.excelbanter.com/excel-programming/276757-customize-options-msgbox.html)

Darrin Henry

Customize options in a MsgBox
 
Hello,

I am in need of some assistance. I have to code a command button, when
the button is pressed, a msgbox need to popup. This is normally not a
problem, I can do it in my sleep. However, what I am unsure at to what
to do, is give the user three different buttons which I have to name.
And based on which button they push. I need to call a macro for it. I
know how to do the last part, it is just the msgbox I need help on.
Thanks.


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

Jedi[_2_]

Customize options in a MsgBox
 
You can't customize the names of a MsgBox without some serious subclassing,
you'll have to create a Form or if it's not a really professional thing do
something as follows.

Msgbox("Would you like to run Code A(Yes), Code B(No) or Code
C(Cancel)?",vbyesnocancel)

Then code as if msgbox=vbyes, vbno, vbcancel, etc.

gl,
Bodi

"Darrin Henry" wrote in message
...
Hello,

I am in need of some assistance. I have to code a command button, when
the button is pressed, a msgbox need to popup. This is normally not a
problem, I can do it in my sleep. However, what I am unsure at to what
to do, is give the user three different buttons which I have to name.
And based on which button they push. I need to call a macro for it. I
know how to do the last part, it is just the msgbox I need help on.
Thanks.


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




Darrin Henry

Customize options in a MsgBox
 
Thanks, the form worked great. I have a lot to learn.


*** 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 11:58 AM.

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