![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
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 |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
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....... |
|
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: Cincinnati, Ohio, USA
Posts: 6,824
|
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 |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|