vielleicht kann mir jemand helfen. Ich möchte eine Zeile mit Mausdoppelklick hervorheben, und beim Verlassen der Zeile wieder den alten Zustand herstellen
Teil1 habe ich gelöst, aber wie kann ich beim verlassen der Zeile Teil 2 starten.
Danke im voraus
Rudi
Teil 1
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
ActiveSheet.Unprotect
Rows(ActiveCell.Row).Range("a1:x1").Select
With Selection.Interior
.ColorIndex = 40
.Pattern = xlSolid
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
End Sub
Teil 2
???????
ActiveSheet.Unprotect
Rows(ActiveCell.Row).Range("a1:x1").Select
With Selection.Interior
.ColorIndex = xlNone
.Pattern = xlSolid
End With
Rows(ActiveCell.Row).Range("l1,x1").Select
With Selection.Interior
.ColorIndex = 15
.Pattern = xlSolid
Rows(ActiveCell.Row).Range("a1").Select
End With
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True