+ Reply to Thread
Results 1 to 5 of 5

Text Box Colour

  1. #1
    Registered User
    Join Date
    08-20-2015
    Location
    Bedford
    MS-Off Ver
    2010
    Posts
    12

    Text Box Colour

    Hi all,

    So I have the below code that I'm trying to use to get text box 6 to change colour whenever B10 changes colour. In this instance if B10 becomes green I want text box 6 to also go green, and if it goes white text box 6 also turns white. Unfortunately it doesn't seem to be working correctly - no errors, it just doesn't do anything. I have made sure I am changing it from the correct colour values so I am unsure what the problem is.

    Please Login or Register  to view this content.
    Does anyone have any suggestions?

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

    Re: Text Box Colour

    Where is the code located?
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    08-20-2015
    Location
    Bedford
    MS-Off Ver
    2010
    Posts
    12

    Re: Text Box Colour

    I tried putting it in the sheet as well as attached to a button. Ideally I would like it to happen automatically but I'm not sure if I can.

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

    Re: Text Box Colour

    Did you try putting it in the Worksheet_Change event?

  5. #5
    Registered User
    Join Date
    08-20-2015
    Location
    Bedford
    MS-Off Ver
    2010
    Posts
    12

    Re: Text Box Colour

    No, but I am unsure how to use that function. The changing of the textbox colour what I am trying to do is probably best explained by the below
    Button1:
    IF B10=white, then B10 = GREEN
    Then K10,N10,B16,E16,H16,K16,N16,Q16,T16 = WHITE
    If B10 = White then textbox6=white. If B10 = Green then texbox6=green.

    Button2:
    IF K10=white then K10=Green
    IF K10 = White then B10,N10,B16,E16,H16,K16,N16,Q16,T16=white
    IF K10 = White then textbox7=white if K10 = Green then textbox7=green

    The idea being that once a button is pressed, if the cell is white it becomes green and sets the other cells to white and subsequently the text box associated with it changes colour too. As I will need the text boxes to also update when other buttons are pressed (not just their own) I am trying to get it to automatically change

+ 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. Formula to check colour of text or colour of background
    By Wonderful World in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-07-2014, 01:49 AM
  2. Replies: 1
    Last Post: 09-10-2013, 10:28 PM
  3. [SOLVED] Macro to change text colour of adjacent cell to the same text colour as target cell
    By kayoke in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 06-28-2012, 04:18 AM
  4. Replies: 2
    Last Post: 06-07-2011, 07:00 AM
  5. How to make row change colour based on text colour in row?
    By Joanna13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 09-02-2010, 04:39 PM
  6. changing all text boxes of one fill colour to another colour
    By was0696 in forum Word Formatting & General
    Replies: 3
    Last Post: 02-18-2010, 05:57 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