How do I enforce the transparent property of certain activeX

L

Legacy 98055

Guest
Hello everyone!
This has been an ongoing nuisance for me and I hope there is a solution.
If I set the backstyle property of a commandbutton to transparent, it works until the button is clicked. The button's background is a shape object with a color gradiant, so I cannot solve this problem by simply changing the backcolor of the button.
Any suggestions, work-arounds?
Thanks,
Tom
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
On 2002-05-10 20:37, TsTom wrote:
Hello everyone!
This has been an ongoing nuisance for me and I hope there is a solution.
If I set the backstyle property of a commandbutton to transparent, it works until the button is clicked. The button's background is a shape object with a color gradiant, so I cannot solve this problem by simply changing the backcolor of the button.
Any suggestions, work-arounds?
Thanks,
Tom

Hi Tom
I have my theory on why it will not work...

But as a work around Try:

1) Using a Frame control (from Forms control)
2) To get the Frame control to the colour
gardient try selecting your current Shape
and copying & paste into paint prgm.
save as name OR just do a copy & paste
Directly into the frames property.

The Frame on a worksheet is an embedded
self contained object that will hold its
own objects.
What you have to do is to
1) Get into Edit mode
2) Select the Frame
3) Right click on it and select Frame
object > EDIT
4) From the Edit mode select the ActiveX
control buttons and place them in the
container. In your case the cmdbutton
If the ActiveX toolbox doesn't appear then
right clci k again and from the selection
choose > Toolbox....select your control
to insert into the container here.

You need to be in Edit mode and right click
Then select Toolbox to select the cmdbtn
to insert > right click and set background
here.......
 
Upvote 0
Thanks for the reply Ivan.
I may have muddied the waters by including the irrelevant information about what type of surface the commandbutton was placed on. This transparency problem does not seem to care where the control is placed. I tried placing the button on a frame as to your advice in your reply and it did not seem to help in my case.
A workaround for now appears to be:

Sub ControlInQuestion_Click()
ControlInQuestion.Visible = False
ControlInQuestion.Visible = True
'Code Here
End Sub

Seems to reset the initial properties.

If you have any other suggestions, please reply.

Thanks again for your help,
Tom
 
Upvote 0

Forum statistics

Threads
1,213,494
Messages
6,113,974
Members
448,537
Latest member
Et_Cetera

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