+ Reply to Thread
Results 1 to 11 of 11

Temporary highlight row of active cell

  1. #1
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Temporary highlight row of active cell

    Greetings gurus,

    When looking at a spreadsheet with many columns, it would be nice of the row of the cell I have selected would remain highlighted in yellow, so that as I scroll across rows it's easy to view the data associated with the selected cell. Of course, if I select antoher cell, I would want the highlighting to change to THAT row. I'm guessing this would have to be in a this.workbook change event.

    I tried a search on this forum, with no luck. Does anyone know of a simple way to do this?

    Thanks in advance.
    Last edited by hutch@edge.net; 11-19-2010 at 01:13 AM.

  2. #2
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Temporary highlight row of active cell

    Something like this might work. It uses the SelctionChange event rather than the Change event.
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Temporary highlight row of active cell

    Since I think you wanted to highlight ROWS and not COLUMNS just change Columns references to Rows in the code that Mikerickson gave you.

    ....and turn Screen Updating back on before End Sub
    Last edited by Cutter; 11-18-2010 at 09:39 PM.

  4. #4
    Valued Forum Contributor
    Join Date
    03-23-2008
    Location
    Tennessee
    MS-Off Ver
    Office 2007
    Posts
    706

    Re: Temporary highlight row of active cell

    How cool is that?!? Thanks to Mike for the code, and to Cutter for the correction. Works perfectly. I simply added the following code in the Worksheet module:

    Please Login or Register  to view this content.
    Thanks a million, guys. This thread is Solved!

  5. #5
    Registered User
    Join Date
    01-17-2011
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Temporary highlight row of active cell

    hi guys,
    I want to try the above. How do i input this code to excel?

  6. #6
    Registered User
    Join Date
    12-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Temporary highlight row of active cell

    Just FYI - I developed this alternative to help keep track of the row of my selected cell without interfering with ANY formatting. (adapt to your own needs)

    THIS MUST GO INTO THE WORKSHEET CODE OBJECT - NOT A MODULE. Ask for clarification if needed.

    Please Login or Register  to view this content.
    Feel free to spread the code love. A mention of Methodician would be appreciated.
    Last edited by Methodician; 04-08-2013 at 04:32 PM.

  7. #7
    Registered User
    Join Date
    12-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Temporary highlight row of active cell

    Also - LOOK!

    http://www.tushar-mehta.com/publish_...d%20cell.shtml

    This might be the best method in some cases but I found it created more problems in my formatting-heavy sheet than the above code block. It did fix the flickering issue though. Not worth it in my case.
    Last edited by Methodician; 04-08-2013 at 06:36 PM.

  8. #8
    Registered User
    Join Date
    02-09-2014
    Location
    Sabah,Malaysia
    MS-Off Ver
    Excel 2010
    Posts
    1

    Re: Temporary highlight row of active cell

    hi...everyone...
    i'm new here...
    i need help to Temporary highlight of active cell in Table...can anyone help me solve this

  9. #9
    Registered User
    Join Date
    12-06-2012
    Location
    United States
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Temporary highlight row of active cell

    You need to be more specific. What in the above is not working for you? What exactly are you trying to do? Can we see your malfunctioning code?

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: Temporary highlight row of active cell

    samninie,

    Unfortunately you need to post your question in a new thread, it's against the forum rules to post a question in the thread of another user. If you create your own thread, any advice will be tailored to your situation so you should include a description of what you've done and are trying to do. Also, if you feel that this thread is particularly relevant to what you are trying to do, you can surely include a link to it in your new thread.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  11. #11
    Registered User
    Join Date
    02-18-2015
    Location
    Uk
    MS-Off Ver
    7
    Posts
    1

    Unhappy Re: Temporary highlight row of active cell

    Quote Originally Posted by Methodician View Post

    THIS MUST GO INTO THE WORKSHEET CODE OBJECT - NOT A MODULE. Ask for clarification if needed.

    [CODE]Public CurrentRow As Range 'THIS MUST BE PUBLIC AND MUST BE OUTSIDE THE SUB OR THE DATA WILL BE LOST AND FORMATTING ARTIFACTS WILL BE A MESS
    Hi i am struggling with this, very new to any sort of coding in excel, "not a module"? and "must be public" are confusing me, tried straight copying and pasting in the the code box for sheet 1 but it doesnt appear to do anything? using excel 2013.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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