Hi,

I am trying to use the code below to highlight the active row with a double-click but it's been a dud. The user is double-clicking on a GL Account Number in column A and I would like that particular row (A:W) to format to a style I defined as "Highlight".

Any advice on my mistake is appreciated.

Private Sub Worksheet_BeforeDoubleClick2(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("A9:W250")) Is Nothing Then
 Application.ScreenUpdating = False
 Range("A" & Target.Row & ":W" & Target.Row).Style = "Highlight"
 Application.ScreenUpdating = True
End If

End Sub
I don't think it matters, but I am successfully running this code on the same worksheet. The user is double-clicking a GL Account Number and it is being pasted into cell A1, which ultimately fuels some index formulas.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("A8:A300")) Is Nothing Then
    Range("A1").Value = Target.Value
End If
End Sub