+ Reply to Thread
Results 1 to 9 of 9

Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

  1. #1
    Registered User
    Join Date
    03-08-2015
    Location
    Detroit, MI
    MS-Off Ver
    2013
    Posts
    9

    Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

    Hi There - hoping someone can help. I am a complete VBA novice and need help. I'd like the font color in my linked text box on chart named "GA" to match font color of $H$4 cell content in sheet "Data Input" when it changes (cell font color currrently changes based on conditional formatting). Have been googling forever and not getting anywhere - any and all help will be greatly appreciated!!

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,603

    Re: Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

    What's the logic behind the conditional formatting?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    03-08-2015
    Location
    Detroit, MI
    MS-Off Ver
    2013
    Posts
    9

    Re: Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

    Not sure if this will answer it: On sheet named ("DataInput"), from a drop-down box in cell $H$3 the user will select the word "Green", "Yellow", or "Red". In cell $H$4 below that, user will see either a Green Circle, Yellow Triangle, or Red X (Webdings Font). The text box on chart (on separate sheet named "GA") is linked to the cell $H$4 on "DataInput" sheet. The text box is updating fine but font color is not matching the Webding Font color seen in cell $H$4.

  4. #4
    Registered User
    Join Date
    03-08-2015
    Location
    Detroit, MI
    MS-Off Ver
    2013
    Posts
    9

    Re: Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

    The conditional formatting is to correctly color the font of the Circle, Triangle or X Webding and is applied to cell $H$4 based on the entry in the drop down box in cell $H$3.

  5. #5
    Registered User
    Join Date
    03-08-2015
    Location
    Detroit, MI
    MS-Off Ver
    2013
    Posts
    9

    Re: Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

    Not sure if this will answer it: On sheet named ("DataInput"), from a drop-down box in cell $H$3 the user will select the word "Green", "Yellow", or "Red". In cell $H$4 below that, user will see either a Green Circle, Yellow Triangle, or Red X (Webdings Font). The text box on chart (on separate sheet named "GA") is linked to the cell $H$4 on "DataInput" sheet. The text box is updating fine but font color is not matching the Webding Font color seen in cell $H$4.

    The conditional formatting is to correctly color the font of the Circle, Triangle or X Webding and is applied to cell $H$4 based on the entry in the drop down box in cell $H$3.

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,603

    Re: Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

    That's actually what I needed as it tells me that we can use the change event of the sheet the chart is on to trigger the code to change the font colour on the textbox on the chart.

    Can you upload an example workbook with an example chart?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    In the meantime here's some sample code.
    Please Login or Register  to view this content.
    Last edited by Norie; 03-08-2015 at 09:33 AM.

  7. #7
    Registered User
    Join Date
    03-08-2015
    Location
    Detroit, MI
    MS-Off Ver
    2013
    Posts
    9

    Re: Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

    Here ya go ... thanks for the assist !!
    Last edited by rz9wqm; 03-08-2015 at 10:12 AM.

  8. #8
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,603

    Re: Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

    Try this, it goes in the Data Input sheet module which can be accessed by right clicking the sheet tab and selecting View Code.
    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    03-08-2015
    Location
    Detroit, MI
    MS-Off Ver
    2013
    Posts
    9

    Re: Excel 2013 - Need VBA code to update Chart Text Box Font Color based on cell entry

    Perfect - you have no idea how much you've helped !!! Thank you !! Have a wonderful day !!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Can you change the color of the font on the tab? Excel 2013
    By phpolicylady in forum Excel General
    Replies: 1
    Last Post: 03-04-2015, 11:19 AM
  2. Change font color based on the ending text string (date) of a cell
    By bcn1988 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 01-31-2013, 04:04 PM
  3. VBA to change font color of range of cells based on text not in another cell
    By tk31271 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-30-2013, 09:36 AM
  4. Change font color based on font color of another cell
    By Ibyers in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2012, 09:36 AM
  5. difficulty writing code for changing font color if cell contains specific text
    By curbster in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 08-13-2009, 03:23 AM

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