Change Command Button Shapes

slimimi

Well-known Member
Joined
May 27, 2008
Messages
532
Hello there.
I am using excel 2003.

I am trying to change the shape of my command buttons on my userform.
Is there a way to do this please?

Also - further to that - is it possible to make the shape change when a user hovers their cursor pointer over the command button?

(the first question's answer is really what i need)

2nd one is just an additional bonus if anyone knows the answer - it would be great.

Thanks alot.
 

Excel Facts

Can a formula spear through sheets?
Use =SUM(January:December!E7) to sum E7 on all of the sheets from January through December
Don't know if you can do a change-on-hover, but, for the first part of your question, you can insert an autoshape, a clip art, a picture, etc., right-click on it, and assign your macro to it.
 
Upvote 0
If you select "Draw" from the Drawing toolbar on the View menu you'll see there is an option to Change Auto Shape (I think it's down at the bottom left-hand corner of the screen). Just frame the current button with your cursor and choose a different shape.

I don't know about changing on hover either but that would be cool. On a somewhat related topic: If I have several macro buttons set up across the screen, I can sometimes get distracted and forget which macro I last clicked. I found that recording a color change into each macro when I click on it spares me any confusion. I like to use the auto-shape that looks like a rectangular button a lot and add a little shadow to it for depth. With a half dozen of them all lined up side by side, I'll usually format them with some drab color. I'll then have the macros reformat the colors as I click on each one so that the one I last clicked on will be different from all the rest. I like to use "From center" on the Gradiants tab in the Fill Effects so it looks like the active botton is being lit in the center. You need to be sure you though that you include the reformatting of each of the other buttons back to the drab color you started with so they'll appear to be turned off when you're on another button. It's a little time-consuming to set up but I think worth the trouble, and it always makes a good impression on others who might use the sheet.

I just thought maybe this would help you accomplish your goal instead of the change-on-hover thing.
 
Last edited:
Upvote 0
Hi barry i cant do this in VB which is what i want to do.
I want to change the shape of the command buttons on my userform in VB.
Hope that makes things a litte clearer.
 
Upvote 0
Thanks so much for the info - i will investigate your method - thank you.

Regarding the first part - i cant seem to do what you suggested.,
I have created a form in VB - but if i select the command button and try to go to the drawing toolbar in excel - it does not allow me to change the shape of the button.
 
Upvote 0
It's just as easy to use a form from the drawing toolbar in the first place so you can change it later however you want.
 
Upvote 0
You cannot use the Drawing toolbar with a userform. Nor can you change the shape of a commandbutton. Userforms are pretty basic. If you really need that sort of advanced functionality, you should look at creating add-ins using Windows forms in .Net, IMO.
 
Upvote 0
Here is another example that I posted in your other thread. If implimented properly, you can indirectly render images of your autoshapes on your userform...

<a href="http://home.fuse.net/tstom/MouseEventsUserformControls.zip"><img src="http://home.fuse.net/tstom/zip.gif"width="16"height="16"border="0"></a> <a href="http://home.fuse.net/tstom/MouseEventsUserformControls.zip">MouseEventsUserformControls.zip</a>

You should use the code from this example.
<a href="http://home.fuse.net/tstom/HotTrackingFrame.zip"><img src="http://home.fuse.net/tstom/zip.gif"width="16"height="16"border="0"></a> <a href="http://home.fuse.net/tstom/HotTrackingFrame.zip">HotTrackingFrame.zip</a>
 
Upvote 0

Forum statistics

Threads
1,214,789
Messages
6,121,605
Members
449,038
Latest member
Arbind kumar

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