Ich möchte wenn ich zb.auf Spalte 25 einen Doppelklick mache,das die Spalte 25 gelöscht wird.
Habe es mit Recorder probiert,leider ohne Erfolg.
Könnte mir Bitte jemand dabei helfen ?
Danke & Gruß,Heinz
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not OldSelection Is Nothing Then
If Target.Address = OldSelection.Address Then
Set OldSelection = Nothing
Rows(Target.Row).Delete: Exit Sub
End If
End If
If Target.Rows.Count = 1 And Target.Cells.Count = 256 Then
Set OldSelection = Target
End If
End Sub
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Excel.Range, Cancel As Boolean)
If Target.Column = 1 Then
Dim lstrAdr As String
lstrAdr = ActiveCell.Address
Application.CutCopyMode = False
Rows("2:4").Copy 'wenn 1 - 4, dann musst du die 2 in 1 ändern
Range(lstrAdr).Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
ActiveWindow.SmallScroll Down:=10
End If
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Public OldSelection As Range
If Not OldSelection Is Nothing Then
If Target.Address = OldSelection.Address Then
Set OldSelection = Nothing
Rows(Target.Row).Delete: Exit Sub
End If
End If
If Target.Rows.Count = 1 And Target.Cells.Count = 256 Then
Set OldSelection = Target
End If
End Sub