how cover icon or picture over commandbutton on userform without show borders commandbutton

KalilMe

Active Member
Joined
Mar 5, 2021
Messages
343
Office Version
  1. 2016
Platform
  1. Windows
hello

I'm asking if there is way to cover the commandbutton after load the icon or picture from PC without see any borders or styles for the commandbutton just show my icon or pictur orginal and when press it should work like commandbutton . the commandbutton should be back picture or icon as if there is no commandbutton .
any idea experts for this question?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
You can add an image object to the UserForm and put it right on top of the command button. Then you can add code for the Click event for the image to run a macro.

Why do you even have a command button if you want to cover it?
 
Upvote 0
Why do you even have a command button if you want to cover it?
this is kind of aesthetics , just when press the picture will show for the user as if commandbutton
 
Upvote 0
I don't understand the aesthetics of something that the user never sees. You don't need the command button to do this.

Was my suggestion clear? Do you need an example?
 
Upvote 0
When you press the command button, you will see how the button enters the interior and then returns to its normal position. The same thing should happen with the image.
 
Upvote 0
If the commandbutton is covered by a shape you cannot press it.

What you are asking in post #5 is completely different than your original question. My answer was about how to implement the functionality when the shape is clicked. Now it sounds like you are asking how to create a shape that will change appearance when you click on it so that it looks like it was depressed and released, similar to the effect built in to the command button. This would take creating two versions of the shape and using the MouseUp and MouseDown events on the shape to alternate. I have no experience doing that and unfortunately do not have the time to research and develop a solution for you.
 
Upvote 0
What you are asking in post #5 is completely different
based on OP
if there is way to cover the commandbutton after load the icon or picture from PC without see any borders or styles for the commandbutton
this means commandbutton should be behind the picture without showing there is commandbutton , but when press on pic then should appearance when you click on it so that it looks like it was depressed and released .

This would take creating two versions of the shape and using the MouseUp and MouseDown events on the shape to alternate
may be else body can help .
thanks for your time .
 
Upvote 0

Forum statistics

Threads
1,215,660
Messages
6,126,088
Members
449,287
Latest member
lulu840

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