ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Form Control Button Color (https://www.excelbanter.com/excel-discussion-misc-queries/183384-form-control-button-color.html)

Richard

Form Control Button Color
 
How can I change the color of the button? I can change the font style and
color but cannot find how to change the button color.

ExcelBanter AI

Answer: Form Control Button Color
 
  1. Right-click on the button and select "Format Control" from the drop-down menu.
  2. In the "Format Control" dialog box, go to the "Control" tab.
  3. Under the "Appearance" section, click on the "Color" dropdown menu.
  4. Select the color you want to use for the button.
  5. Click "OK" to apply the changes.

    If you don't see the "Color" dropdown menu, make sure that the "3-D shading" checkbox is unchecked. This will enable the color options.

    Note that this method only works for Form Control buttons, not ActiveX Control buttons. If you're using an ActiveX Control button, you can change the color by right-clicking on the button and selecting "Properties" from the drop-down menu. In the "Properties" window, look for the "BackColor" property and select the color you want to use.

Jim Thomlinson

Form Control Button Color
 
With buttons from the forms toolbar you can not change the colour of the
button. To do that you need to use a button from the control toolbox. That
will require a single line of code to make everything work...
--
HTH...

Jim Thomlinson


"Richard" wrote:

How can I change the color of the button? I can change the font style and
color but cannot find how to change the button color.


Richard

Form Control Button Color
 
I'm using the button to assign a macro. I was asked to make it more visible,
the light gray kind of disappears in the white background.

"Jim Thomlinson" wrote:

With buttons from the forms toolbar you can not change the colour of the
button. To do that you need to use a button from the control toolbox. That
will require a single line of code to make everything work...
--
HTH...

Jim Thomlinson


"Richard" wrote:

How can I change the color of the button? I can change the font style and
color but cannot find how to change the button color.


Jim Thomlinson

Form Control Button Color
 
Add a new command button from the control toolbox. Right click the button and
select Properties. A Properties window will open up allowing you to change
the Caption, Font, Fore Colour (font), and Background Colour (button). If you
double click on the button it will take you into the VB editor with a code
stub that looks something like this...

Private Sub CommandButton1_Click()

End Sub

Add a line of code so that you end up with this
Private Sub CommandButton1_Click()
Call MyMacroName 'the name of your recorded macro
End Sub

Go back to XL and get out of design mode by clicking the Triangle and Ruler
icon on the control toolbox. Your new button should now be looking and
working the way you want it to.
--
HTH...

Jim Thomlinson


"Richard" wrote:

I'm using the button to assign a macro. I was asked to make it more visible,
the light gray kind of disappears in the white background.

"Jim Thomlinson" wrote:

With buttons from the forms toolbar you can not change the colour of the
button. To do that you need to use a button from the control toolbox. That
will require a single line of code to make everything work...
--
HTH...

Jim Thomlinson


"Richard" wrote:

How can I change the color of the button? I can change the font style and
color but cannot find how to change the button color.



All times are GMT +1. The time now is 04:45 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com