+ Reply to Thread
Results 1 to 6 of 6

Change Font Colour in Autoshape

  1. #1
    Forum Contributor
    Join Date
    11-28-2005
    Location
    Dover, England
    MS-Off Ver
    365
    Posts
    172

    Change Font Colour in Autoshape

    I am looking for a solution to change the colour of the font within an Autoshape rectangle depending on the value of a cell (BN1).

    There are 4 options and I require the colours to change to Dark Green, Red, Yellow and Blue.

    Any help would be appreciated
    Last edited by Tellm; 06-24-2010 at 04:51 AM.

  2. #2
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Change Font Colour in Autoshape

    Try below Code

    Please Login or Register  to view this content.
    How to use:
    1. Copy above code.
    2. Right Click to the sheet and select View Code
    3. Paste code into the right pane.
    4. Press Alt + Q to close the VBE.
    5. Save workbook before any other changes.
    Attached Files Attached Files
    Люди, питающие благие намерения, как раз и становятся чудовищами.

    Regards, ?Born in USSR?
    Vusal M Dadashev

    Baku, Azerbaijan

  3. #3
    Forum Contributor
    Join Date
    11-28-2005
    Location
    Dover, England
    MS-Off Ver
    365
    Posts
    172

    Re: Change Font Colour in Autoshape

    Vusal

    Many thanks for getting back so quick. The solution you have provided on your file is exactly what I need however, I have put it into my sheet and it isn't working. Is it because I have 3 other Text boxes/Rectangles on the worksheet? I have changed the cell A1to BN1 which is the cell it needs to reference to. The textbox number that I need the change to happen to is 15, if this helps?

    Regards

  4. #4
    Forum Contributor
    Join Date
    11-28-2005
    Location
    Dover, England
    MS-Off Ver
    365
    Posts
    172

    Re: Change Font Colour in Autoshape

    Vasul

    One more question - where do you get the colour numbers from?

  5. #5
    Forum Expert contaminated's Avatar
    Join Date
    05-07-2009
    Location
    Baku, Azerbaijan
    MS-Off Ver
    Excel 2013
    Posts
    1,430

    Re: Change Font Colour in Autoshape

    Record some macro, and color cell A1 in red, A2 in Green etc. After you've finished, press stop recording button and press alt + F11 to view recorded macro. There you'll see module1. Double click on it and you'll be able to observe recocded macro.
    For each cell recorded macro should look like this

    Please Login or Register  to view this content.
    Last edited by contaminated; 06-17-2010 at 05:36 PM.

  6. #6
    Forum Contributor
    Join Date
    11-28-2005
    Location
    Dover, England
    MS-Off Ver
    365
    Posts
    172

    Re: Change Font Colour in Autoshape

    Vusal

    Again thanks for this information, I appreciate your time and effort.

    Are you able to determine as to why I cannot get your code to work for changing the autoshape?

+ 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