Insert picture in CommandButton (ActiveX control)

antaeusguy

Board Regular
Joined
Mar 8, 2010
Messages
81
I've inserted an ActiveX control, a CommandButton in my worksheet.

Usually, in design mode, I open the properties and change it's caption value to make the CommandButton display the function, e.g. in my case I put as "Search".

I have a magnifying glass picture and would like to insert it into the CommandButton. I like to do this because I want to get the "pressed down" effect of the CommandButton.

If I insert the picture as an object and assign a macro to it, I can't seem to make it "sunk" when clicked like how the CommandButton does...

Does anyone have any suggestion on this, would be much appreciated. :cool:
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
I'm not sure why you're inserting the picture as an object. If you do that, I think you'd need a second picture which was a 'sunken' version of the first one, and which you'd swap it in when the control was clicked and swap out again afterwards. That seems like a lot of trouble to me.

If you already have a button, just set its Picture property to point to your graphic file, then it will sink when it's clicked.

Or at least it does here!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,518
Messages
6,179,253
Members
452,900
Latest member
LisaGo

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