Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
nwhan
 
Posts: n/a
Default highlight selected row permanently until u move out from the row

as records in excel increase, its hard for us to know which rows we are
selected or referring to..for example column(A) to column(Z) in row 10
it will be easier if the selected row(10) is highlighted the moment we move
to row10
to edit any column ...
wonder if i can do that ?

when u move out from row10, maybe to row 15...then row 15 will be
highlighted next..
the moment we move to whichever row, that particular row is to be
highlighted..

can it be done ? thanks...
  #2   Report Post  
Pank
 
Posts: n/a
Default

Hi Nwhan,

I asked the same question sometime ago and was offered the following
solutions were offered by Julie D, Bob Philips and Ron de Bruin.

See below.


Hi Pank

found this code from an old post by Earl Kiosterud - which seems to do what
you require
---------

Private Sub Worksheet_SelectionChange(ByVal Target As Excel.Range)
Static Roww As Integer
Static NotFirstTime As Boolean
Application.EnableEvents = False
If NotFirstTime Then ' remove color fill from prior row
Range(Cells(Roww, 1), Cells(Roww, 10)).Interior.ColorIndex = xlNone
Else
NotFirstTime = True
End If
Range(Cells(Target.Row, 1), Cells(Target.Row, 10)).Select
Roww = Selection.Row ' save current row for uncoloring when row exited
Selection.Interior.ColorIndex = 4 ' color current row
Application.EnableEvents = True
End Sub

------------

to utilise the code, right mouse click on the sheet tab of the sheet you
want to use this in - choose view code - and copy & paste the code in there
use alt & f11 to switch back to the sheet and try it

Cheers
JulieD

'----------------------------------------------------------------
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'----------------------------------------------------------------
Cells.FormatConditions.Delete
With Target.EntireRow
.FormatConditions.Add Type:=xlExpression, Formula1:="TRUE"
With .FormatConditions(1)
With .Borders(xlTop)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
With .Borders(xlBottom)
.LineStyle = xlContinuous
.Weight = xlThin
.ColorIndex = 5
End With
End With
.FormatConditions(1).Interior.ColorIndex = 20
End With

End Sub


'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select

See this Add-in
http://www.cpearson.com/excel/RowLiner.htm


"nwhan" wrote:

as records in excel increase, its hard for us to know which rows we are
selected or referring to..for example column(A) to column(Z) in row 10
it will be easier if the selected row(10) is highlighted the moment we move
to row10
to edit any column ...
wonder if i can do that ?

when u move out from row10, maybe to row 15...then row 15 will be
highlighted next..
the moment we move to whichever row, that particular row is to be
highlighted..

can it be done ? thanks...

  #3   Report Post  
Gord Dibben
 
Posts: n/a
Default

See Chip Pearson's Rowliner page.

Download the rowliner add-in.

http://www.cpearson.com/excel/RowLiner.htm


Gord Dibben Excel MVP

On Tue, 31 May 2005 22:20:02 -0700, "nwhan"
wrote:

as records in excel increase, its hard for us to know which rows we are
selected or referring to..for example column(A) to column(Z) in row 10
it will be easier if the selected row(10) is highlighted the moment we move
to row10
to edit any column ...
wonder if i can do that ?

when u move out from row10, maybe to row 15...then row 15 will be
highlighted next..
the moment we move to whichever row, that particular row is to be
highlighted..

can it be done ? thanks...


  #4   Report Post  
nwhan
 
Posts: n/a
Default



"Gord Dibben" wrote:

See Chip Pearson's Rowliner page.

Download the rowliner add-in.

http://www.cpearson.com/excel/RowLiner.htm


Gord Dibben Excel MVP

On Tue, 31 May 2005 22:20:02 -0700, "nwhan"
wrote:

as records in excel increase, its hard for us to know which rows we are
selected or referring to..for example column(A) to column(Z) in row 10
it will be easier if the selected row(10) is highlighted the moment we move
to row10
to edit any column ...
wonder if i can do that ?

when u move out from row10, maybe to row 15...then row 15 will be
highlighted next..
the moment we move to whichever row, that particular row is to be
highlighted..

can it be done ? thanks...


:::::::::::::::::::::::::::::::::::::::::::::::::: :
hey Pank,
thanks for ur codes..but i got it earlier from elsewhere d...
looks almost the same logics...however
same problem when used...
it works fine on rows which has no pattern colour ..
for eg: if i have pattern colour blue in row10...
when i move over to row10 and when it is selected, it will overwrite the
pattern colour and turned back to colourless...
1more prob i found, if protect your work sheet. u'll not be able to enable
the highlighting anymore...
kinda problematic...any solution ?

gord dibben, thanks for that...
i tried that out but when u save it, the thing will be saved as well ..
and will appear staticly when u open up da form...
any solution ? or edition ?

anyway thanks to u both...
  #5   Report Post  
Gord Dibben
 
Posts: n/a
Default

nwhan

The rowliner download from Chip's site is an add-in.(*.xla)

Place it in your Office\Library folder and load through ToolsAdd-ins.

Rowliner works on the activesheet of any workbook.

Nothing to save and what is meant by "staticly"?


Gord

On Wed, 1 Jun 2005 19:01:52 -0700, "nwhan"
wrote:

gord dibben, thanks for that...
i tried that out but when u save it, the thing will be saved as well ..
and will appear staticly when u open up da form...
any solution ? or edition ?

anyway thanks to u both...




  #6   Report Post  
nwhan
 
Posts: n/a
Default



"Gord Dibben" wrote:

nwhan

The rowliner download from Chip's site is an add-in.(*.xla)

Place it in your Office\Library folder and load through ToolsAdd-ins.

Rowliner works on the activesheet of any workbook.

Nothing to save and what is meant by "staticly"?


Gord

On Wed, 1 Jun 2005 19:01:52 -0700, "nwhan"
wrote:

gord dibben, thanks for that...
i tried that out but when u save it, the thing will be saved as well ..
and will appear staticly when u open up da form...
any solution ? or edition ?

anyway thanks to u both...


:::::::::::::::::::::::::::::::::::::::::::::
ok...thanks
but under add-ins which should i check ? there are many add-ins but all
arent checked...so which 1 ?
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
Cells no longer highlight when selected Stephen Excel Discussion (Misc queries) 0 April 22nd 05 08:31 PM
How do I change the highlight color of selected menu items? PepperVL Excel Discussion (Misc queries) 1 March 12th 05 02:13 PM
Cross-bar Highlight alainr Excel Discussion (Misc queries) 1 February 28th 05 07:10 PM
How to highlight row and column of the selected cell Row_Column_Highlight Excel Discussion (Misc queries) 2 February 27th 05 10:48 PM
The selected area grows when I click a cell or press keys to move. yendorexcel Excel Discussion (Misc queries) 2 February 14th 05 06:02 AM


All times are GMT +1. The time now is 04:33 PM.

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

About Us

"It's about Microsoft Excel"