Macro to select / highlight entire row.
How about code that puts a border around the current row? Give this a try.
Right click the tab at the bottom of the worksheet you want to have this
functionality, select View Code from the popup menu that appears and then
copy/paste the following into the code window that opened up...
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
On Error GoTo Whoops
Application.ScreenUpdating = False
Cells.Borders.LineStyle = xlLineStyleNone
Target.EntireRow.BorderAround Weight:=xlMedium
Whoops:
Application.ScreenUpdating = True
End Sub
By the way, this will work for *any* method of moving to a new cell (or
range of cells), not just for the arrow keys.
--
Rick (MVP - Excel)
"Ross" wrote in message
...
How can I get Excel to select an entire row when I use the "Arrow UP" key
or
the "Arrow Down" key?
For Example, if the cursor has selected Cell A3 and I "Arrow Down" to A4,
the cursor would then select the ENTIRE A4 ROW (this spreadsheet has data
in
some of the A:Z columns (columns are not consistently filled for all cell
A4:Z4).
This will help the viewer see all of the A4:Z4 cells highlighted (kind of
a
custom user input aid).
Many Thanks
Ross
|