Form Control Button Color

R

Richard

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.
 
J

Jim Thomlinson

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...
 
R

Richard

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.
 
J

Jim Thomlinson

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.
 
Top