Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default How to highlight active row and column?

when you said highlight, I assumed you meant to select the row and column,
but realized this would be very bad as you would never be able to
delete/change an individual cell. also, the previous macro would not work if
you entered a value and hit enter.

I'd suggest using two macros in the worksheet module and changing the fill
color. these macros use grey to shade the activecell row and column, but you
can use whatever color you like. just turn on the macro recorder, select a
fill color, turn off recorder and go look at the code that was written to
determine what the colorindex is.


Private Sub Worksheet_Change(ByVal Target As Range)
Dim TheRange As Range

Set TheRange = Union(Target.EntireColumn, Target.EntireRow)

Application.EnableEvents = False
Cells.Interior.ColorIndex = xlNone
TheRange.Interior.ColorIndex = 15
Application.EnableEvents = True

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim TheRange As Range

Set TheRange = Union(Target.EntireColumn, Target.EntireRow)

Application.EnableEvents = False
Cells.Interior.ColorIndex = xlNone
TheRange.Interior.ColorIndex = 15
Application.EnableEvents = True

End Sub





"rjamison" wrote:

I have a very large table and I am hoping to find a way to highligh the
current row and coloum somehow to allow a crosshair like look that follows
the active cell. The table is a look up table and following the lines can
be
a pain even with grided shading

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I get row and column of active cell to highlight? chappi Excel Discussion (Misc queries) 2 August 19th 09 10:21 PM
How do I highlight the active row and column headers? GaryW Setting up and Configuration of Excel 2 August 29th 07 03:26 PM
How to set highlight for the column&row header of the active cell Jasmine Excel Worksheet Functions 1 January 14th 06 03:33 PM
How to highlight active row and column? JMB Excel Programming 0 June 14th 05 06:25 AM
How to highlight active row and column? Ricktaxx Excel Programming 4 April 20th 05 05:37 PM


All times are GMT +1. The time now is 07:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"