Consulting

Results 1 to 5 of 5

Thread: Macro Button Color

  1. #1

    Cool Macro Button Color

    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.

  2. #2
    VBAX Mentor
    Joined
    Feb 2015
    Posts
    395
    Location
    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)

  3. #3
    VBAX Mentor
    Joined
    Feb 2015
    Posts
    395
    Location
    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 and select the colour code from the rightmost column

  4. #4
    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

  5. #5
    VBAX Mentor
    Joined
    Feb 2015
    Posts
    395
    Location
    Glad it worked.
    Please mark the thread as "solved" (at top of the thread, click Thread Tools)
    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •