PDA

View Full Version : [SOLVED] Macro Button Color



aacod
04-26-2015, 12:30 PM
I want the following for macro different buttons:

Change the color for different macro buttons to,

1. Black

2. RED

3. Yellow and

4. Dark Blue

Can this be achieved.

Help would be appreciated.

Thanks

aacod.

Yongle
04-26-2015, 02:22 PM
1 Form Controls Button - cannot alter background color - but can alter size and color of text
2 ActiveX Controls Button - right click, select Properties, amend BackColor (limited choices)
3 Insert 4 Shapes - format each one in turn and assign relevant macro to each one(most flexible solution)
(right click, select Format Shape, select Fill, amend FillColor)

Yongle
04-26-2015, 02:47 PM
For ActiveX buttons you can also amend color via VBA as follows

Private Sub CommandButton1_Click()
CommandButton1.BackColor = 16711680
End Sub

Code above alters button back color to blue
Use the table found here (http://www.endprod.com/colors/) and select the colour code from the rightmost column

aacod
04-27-2015, 07:07 AM
Yongle,

I tried the following and worked out pretty good. Thanks. Appreciate it.


3 Insert 4 Shapes - format each one in turn and assign relevant macro to each one(most flexible solution)
(right click, select Format Shape, select Fill, amend FillColor)

Will try the other options and post it later.

aacod

Yongle
04-27-2015, 09:15 AM
Glad it worked.
Please mark the thread as "solved" (at top of the thread, click Thread Tools)
thanks