+ Reply to Thread
Results 1 to 7 of 7

Interior Color change doesn't work in Case Statement

  1. #1
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Interior Color change doesn't work in Case Statement

    Hello, i want to change the cell color of different letters, an example is :

    case i type in the range "k", set the interior color to an rgb.
    Here the code :

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor
    Join Date
    12-14-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    439

    Re: Interior Color change doesn't work in Case Statement

    Use Font instead of Interior if you want to change the color of character. The Character don't have Interior property.

  3. #3
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Re: Interior Color change doesn't work in Case Statement

    I want to change background color.

  4. #4
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,463

    Re: Interior Color change doesn't work in Case Statement

    Quote Originally Posted by Lomoo View Post
    I want to change background color.
    What, behind each individual character? If that is what you are after, it cannot be done... a cell can only have a single fill color.

  5. #5
    Valued Forum Contributor
    Join Date
    12-14-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2007
    Posts
    439

    Re: Interior Color change doesn't work in Case Statement

    It's impossible.

  6. #6
    Registered User
    Join Date
    09-16-2019
    Location
    Italy
    MS-Off Ver
    2016
    Posts
    48

    Re: Interior Color change doesn't work in Case Statement

    Maybe I'm not being clear. I have a cell and in this cell i type a letter, with the Sub Worksheet_Change(ByVal Target As Range) i have to put a code that recognize that letter and change it's background color, not the font color.

  7. #7
    Forum Guru
    Join Date
    04-23-2012
    Location
    New Jersey, USA
    MS-Off Ver
    Excel 365
    Posts
    2,463

    Re: Interior Color change doesn't work in Case Statement

    Okay, so are you saying you want to continually change the background color with each letter as you type them into a single cell? If so, you cannot do that either. VBA code does not run while a cell is in edit mode. The change in the Change Event refers to the value in the cell after that value has been fully entered into the cell.

+ 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. [SOLVED] Change Interior color
    By adamsdr3 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-05-2015, 01:56 PM
  2. Case Select .Interior.Color = RGB(195.195,195) for range
    By Excelnoub in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-22-2014, 07:27 AM
  3. Change interior.color index in FOR
    By isaackoh in forum Excel General
    Replies: 3
    Last Post: 04-16-2014, 10:08 AM
  4. Find a duplicate and then use the duplicates interior.color to change cell color.
    By bopsgtir in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-01-2012, 03:54 PM
  5. Change cell's interior color and font
    By tim5 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2011, 06:21 AM
  6. Change Interior Color using Cell Value
    By PY_ in forum Excel General
    Replies: 4
    Last Post: 03-23-2011, 01:05 PM
  7. Replies: 2
    Last Post: 12-09-2005, 05:15 AM

Tags for this Thread

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