Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Pank Mehta
 
Posts: n/a
Default Colour row that you are working on.

A colleague of mine has a large spreadsheet that she is working on and need
to have the row that she is working on highlighted so that she knows where
she is.

Is the above possible, and if so any help would be appreciated.

Thanks
  #2   Report Post  
JulieD
 
Posts: n/a
Default

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


"Pank Mehta" wrote in message
...
A colleague of mine has a large spreadsheet that she is working on and need
to have the row that she is working on highlighted so that she knows where
she is.

Is the above possible, and if so any help would be appreciated.

Thanks



  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default


'----------------------------------------------------------------
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


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pank Mehta" wrote in message
...
A colleague of mine has a large spreadsheet that she is working on and

need
to have the row that she is working on highlighted so that she knows where
she is.

Is the above possible, and if so any help would be appreciated.

Thanks



  #4   Report Post  
Ron de Bruin
 
Posts: n/a
Default

Hi Pank

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


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Pank Mehta" wrote in message ...
A colleague of mine has a large spreadsheet that she is working on and need
to have the row that she is working on highlighted so that she knows where
she is.

Is the above possible, and if so any help would be appreciated.

Thanks



  #5   Report Post  
Pank Mehta
 
Posts: n/a
Default

Julie, Bob and Ron many thanks for your prompt responses all the solutions as
expected worked a treat.

Pank

"JulieD" wrote:

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


"Pank Mehta" wrote in message
...
A colleague of mine has a large spreadsheet that she is working on and need
to have the row that she is working on highlighted so that she knows where
she is.

Is the above possible, and if so any help would be appreciated.

Thanks




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
Is it possible to change the blue colour of an activated Auto Filter button? Marcel Wilmink via OfficeKB.com Excel Discussion (Misc queries) 1 February 24th 05 08:35 PM
Problems with Colour Printing Aussie CPA Excel Discussion (Misc queries) 1 February 18th 05 12:03 AM
Macro button colour change??? Beefyme Excel Worksheet Functions 1 November 19th 04 06:15 PM
Text in Blue colour, but print in black colour wuwu Excel Worksheet Functions 1 November 13th 04 02:36 PM
Function to return colour of formatted cell ExcelMonkey Excel Worksheet Functions 3 November 1st 04 05:54 PM


All times are GMT +1. The time now is 05:38 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"