+ Reply to Thread
Results 1 to 3 of 3

change button text color

  1. #1
    Martin Just
    Guest

    change button text color

    Hiya. Have a workbook with a commandbutton called "split". The caption,
    likewise, is "split" I need some vba code to change the caption's font
    color from black to gray.

    When I record a macro and change the ForeColor property of the button, it
    only records "ActiveSheet.Shapes("split").Select" and nothing else.

    TIA, Martin



  2. #2
    Barry
    Guest

    RE: change button text color

    Hi Martin

    try something like this:
    ActiveSheet.Shapes("split").DrawingObject.Font.ColorIndex = 15

    Thanks




    "Martin Just" wrote:

    > Hiya. Have a workbook with a commandbutton called "split". The caption,
    > likewise, is "split" I need some vba code to change the caption's font
    > color from black to gray.
    >
    > When I record a macro and change the ForeColor property of the button, it
    > only records "ActiveSheet.Shapes("split").Select" and nothing else.
    >
    > TIA, Martin
    >
    >
    >


  3. #3
    Registered User
    Join Date
    01-29-2015
    Location
    Stockholm
    MS-Off Ver
    Mac
    Posts
    1

    Re: change button text color

    You may also try this:

    Dim btn As Button
    Set btn = ActiveSheet.Buttons(1)
    btn.Font.ColorIndex = 3 'Red l

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1