how to change the appearance of command button

  • Thread starter Thread starter Mighty Magpie
  • Start date Start date
M

Mighty Magpie

I have used command buttons to activate a few macro's and they work fine.

Is it possible to change the colour of a command button from the boring grey
to something, well, more colourful?
 
If you are using an ActiveX Command Button you can change
the BackColor property from the Properties list but your
choices are mostly just various shades of grey. You can
have more control over the color if you change it with
code, like this:

CommandButton1.BackColor = &HFF&

tod
 
Having found that, how can I assign a Macro to that type of button - it
seems that the one(s) I have been using let me do that (assign a Macro) but
do not let me edit the properties
 
If you double click on that control (commandbutton), you'll see where you can
merge your code.

But another way is just to call it from that _click event.

Option Explicit
Private Sub CommandButton1_Click()
Call myOldMacroNameHere
End Sub

myOldMacroName would be a macro stored in a General module.
 
Back
Top