marreco
02-06-2012, 06:27 PM
Good night!
I would like to double-click any cell of a given line and that line will have the interior painted.
Example.
If I do click dus times in "A1" or "D1" or "H1" then a line will be colored.
this code is very similar, but paint the inside only the active cell, and I would like to paint the entire line.
Cross-post:http://www.ozgrid.com/forum/showthread.php?t=162161
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)
If Target.Interior.ColorIndex = xlNone Then
Target.Interior.ColorIndex = 3
ElseIf Target.Interior.ColorIndex = 3 Then
Target.Interior.ColorIndex = xlNone
End If
Cancel = True
End Sub
I would like to double-click any cell of a given line and that line will have the interior painted.
Example.
If I do click dus times in "A1" or "D1" or "H1" then a line will be colored.
this code is very similar, but paint the inside only the active cell, and I would like to paint the entire line.
Cross-post:http://www.ozgrid.com/forum/showthread.php?t=162161
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)
If Target.Interior.ColorIndex = xlNone Then
Target.Interior.ColorIndex = 3
ElseIf Target.Interior.ColorIndex = 3 Then
Target.Interior.ColorIndex = xlNone
End If
Cancel = True
End Sub