View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Doug Doug is offline
external usenet poster
 
Posts: 460
Default One click row highlighting

Might you know why this is causing my undo to loose recent changes applied to
document? When I click a cell anywhere on the sheet, it cancels all
previously saved changes. If I need to undo a change, I won't be able to.
--



"Rick Rothstein" wrote:

Give this Worksheet Change event a try (set the address for your table of
data in the Const statement in place of my "D4:H17" example address)...

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Const TableRangeAddress As String = "D4:H17"
Dim TableRange As Range
On Error GoTo Whoops
Application.ScreenUpdating = False
Set TableRange = Range(TableRangeAddress)
TableRange.Borders.LineStyle = xlLineStyleNone
If Intersect(Target, TableRange) Is Nothing Then Exit Sub
Intersect(Target.EntireRow, TableRange).BorderAround Weight:=xlMedium
Whoops:
Application.ScreenUpdating = True
End Sub

--
Rick (MVP - Excel)


"Doug" wrote in message
...
I have a table. It would be very helpful if when I click on a cell in the
table that it highlight that particular row. I don't want it to highlight
it
with a color or it will cover over the color conditional formatting I
have,
but it would be great if it would show a box around it as though I
selected
the entire row. Can this be done for one click only, as I have macros for
individual cells that are set for double click?
--