I don't know Garry. Where would I add the range? This isn't my code.
I am just using it to help me navigate my excel page. I am clueless.
Any help in elaborating would be greatly appreciated.
For starters.., your code is in a sheet event and so it runs every time
you select a new cell *whether you want it to or not*! Delete all the
code and put the following in a standard module...
Option Explicit
Sub HiLiteRows() 'Ctrl+Shift+H
' Shades entire rows of a selection of cells;
' Selection can be multiple areas.
Dim lColor&, vRow
lColor = 6 'Yellow
For Each vRow In Selection.Rows
vRow.EntireRow.Interior.ColorIndex = lColor
Next 'vRow
End Sub 'HiLiteRows
...and assign a keyboard shortcut to it so you can fire it only when you
choose.
--
Garry
Free usenet access at
http://www.eternal-september.org
Classic
VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.
vb.general.discussion