Change "Name" within Command Button

golf4

Active Member
Joined
Jul 8, 2002
Messages
452
Hi, everyone -

I think I've seen this addressed a while ago, but couldn't find it with the Search option.

I have a number of command buttons, within my worksheets, that I use to print the worksheets. I'm using the standard "YES", "NO", "OK", etc. I'm wondering whether there is a method in which I can modify the VB code strip to have the name within the command button state "PRINT"?

Thanks for the help,

Frank
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Heya Frank, howzit?!


Do you mean regular CommandButtons or MsgBox buttons? What exactly are we talking about here?
 
Upvote 0
Thanks for the response, guys -

Hey Zack -
Things going pretty good in the Valley. How about out East?

Sorry about the misunderstanding from my post. What I'm actually referring to is the msgbox code like I've pasted below:

Paperwarning = MsgBox("I HAVE HEARD THE WARNING MESSAGE AND HAVE VERIFIED WHETHER ANY FAMILY MEMBER QUALIFIES FOR THE EARNED INCOME DISREGARD. If you have verified all household members, press YES to continue the printing your worksheets. If not, press NO and enter the MEID income data.", vbYesNo, "REMEMBER TO CHECK ALL HOUSEHOLD MEMBERS FOR FOR MEID!!!")

What I would like to show is the YES button to show "Print" or other options like that. Is there a relatively easy way to modify my code?

Thanks for the help and stay safe out there,

Frank
 
Upvote 0
Frank

You can alter the buttons on a MsgBox but it would involve using Windows API, which I don't think would be that easy?

Have you looked into using a userform?
 
Upvote 0
Norie has it Frank. You can't without API. Ivan Moala shows how here: http://www.xcelfiles.com/API_11.html

But, imho, it is far easier doing the UserForm. But I try to stay away from API whenever possible; too many variables to screw up. :LOL:
 
Upvote 0
Hi, guys -

Thanks for the info. To tell you the truth, never thought about going with userforms. It certainly seems the easier way to go though. I'll give your suggestions a shot.

Thanks again for the help,

Frank
 
Upvote 0
Hi, Zack, Peter & Norie -
Just wanted to thank you guys again for the help. Tried the Userform suggestion, rather than the msgbox option, and it works GREAT!!!

Thanks again. (y)

Frank
 
Upvote 0

Forum statistics

Threads
1,202,975
Messages
6,052,868
Members
444,606
Latest member
rwmhr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top