Results 1 to 6 of 6

Changing Background Color for Active Cells, then back to Previous Color...

Threaded View

  1. #1
    Registered User
    Join Date
    11-18-2007
    Posts
    4

    Changing Background Color for Active Cells, then back to Previous Color...

    Good Afternoon,

    I would like to be able to change the background colors of all cells from white to blue, while still being able to have the active cell show up as yellow. I need some help here...everything seems to end up back with the white background (except for the active cell being yellow). Below is the code I am using:

    Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Intersect(Range("A1:Z50"), Range(Target(1).Address)) _
    Is Nothing Then Exit Sub
    Cells.Interior.ColorIndex = xlNone
    ActiveCell.Interior.Color = vbYellow
    End Sub
    Any help here would be greatly appreciated! Many thanks in advance...


    TMCinDC
    Last edited by alansidman; 04-12-2016 at 02:58 PM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Change cell background color based on another cells background color
    By Queo in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 4
    Last Post: 06-10-2014, 05:28 AM
  2. Replies: 4
    Last Post: 12-29-2013, 11:41 PM
  3. [SOLVED] Color Index to sum up cells based on background color
    By jph89 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-16-2013, 03:23 PM
  4. Setting background color with VBA removes gridlines -- how to bring back
    By chasdl in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-10-2013, 05:27 PM
  5. Changing the back color of the cells using vba
    By aman1234 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-29-2012, 06:39 AM
  6. [SOLVED] Macro to change all cells with a certain background color in another background color
    By kevinvzandvoort in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-13-2012, 11:04 AM
  7. Macro for changing background color of the cells
    By rishuverma in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-21-2008, 09:52 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