+ Reply to Thread
Results 1 to 6 of 6

Highlighting Active Cell in a Table

  1. #1
    Forum Contributor
    Join Date
    04-23-2014
    Location
    United Kingdom
    MS-Off Ver
    Microsoft 365
    Posts
    149

    Highlighting Active Cell in a Table

    I'm trying to find some code that will highlight the column and row of the the active cell. Except, I don't want the whole column and row highlighted, only the column and row range of the table (so this would be predefined in the VBA code). So, something similar to this: http://www.excel-easy.com/vba/exampl...tive-cell.html.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Highlighting Active Cell in a Table

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    04-23-2014
    Location
    United Kingdom
    MS-Off Ver
    Microsoft 365
    Posts
    149

    Re: Highlighting Active Cell in a Table

    Quote Originally Posted by stnkynts View Post
    Please Login or Register  to view this content.
    Sorry, where do I put this? That was a little vague.

  4. #4
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Highlighting Active Cell in a Table

    The website you linked tells you exactly how to do it. Read it.

  5. #5
    Forum Contributor
    Join Date
    04-23-2014
    Location
    United Kingdom
    MS-Off Ver
    Microsoft 365
    Posts
    149

    Re: Highlighting Active Cell in a Table

    Quote Originally Posted by stnkynts View Post
    The website you linked tells you exactly how to do it. Read it.
    Sorry, but I did read it but it didn't tell me to do what I wanted.

    I found a better example: http://www.techrepublic.com/article/...al-formatting/. This is pretty much what I want. It highlights the column/row of a RANGE. I have implemented it into my own spreadsheet. The only problem with it is it highlights the column or row of the range even when you click outside that range. What I really need is to get it so it does not highlight anything within the range when you click outside of that range. So, for example, if the range is C5:G20, I only want the column/row of that range to be highlighted when the user clicks within it.

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,648

    Re: Highlighting Active Cell in a Table

    This is the code for Worksheet_SelectionChange Event i.e. the code will execute once you change the selection on the sheet. You need to place this code on worksheet module. i.e. Right click on the Sheet Tab where you want this code to be executed --> View Code --> In the opened code window, paste the code if you have already copied it from somewhere or on the code window you will find two drop down with the default values General and Declarations --> Click the first drop down which has General by default and select Worksheet --> Now click on second drop down and select SelectionChange --> Now here you can write your own code for Worksheet SelectionChange Event.

    To view the code in the attached sheet, right click on Sheet1 Tab --> View Code.

    Hope this helps.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

+ 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. Highlighting duplicate values in a column in conjunction with active cell
    By Brontosaurus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-03-2014, 01:11 PM
  2. Highlighting Active Cell
    By TheSeal in forum Excel General
    Replies: 2
    Last Post: 07-20-2007, 04:06 AM
  3. Highlighting an active cell
    By pjy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-02-2006, 12:40 PM
  4. Highlighting The Active Cell
    By Pelham in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-01-2006, 10:00 AM
  5. [SOLVED] Highlighting the active row with special colour
    By Raj Mazumdar in forum Excel General
    Replies: 5
    Last Post: 01-20-2006, 11:50 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