ich habe folgende Routine
Private Sub Workbook_SheetBeforeDoubleClick(ByVal Sh As Object, ByVal Target As Range, Cancel _
As Boolean)
' Insert new row
Dim wks As Worksheet
Set wks = ActiveSheet
wks.Unprotect
Dim myRow, myCol As Integer
Dim i As Integer
myRow = Target.Row
myCol = Target.Column
If Target.Font.Color = RGB(120, 120, 120) Then
Cancel = True
Rows(ActiveCell.Row).Select
Selection.Insert Shift:=xlDown
Rows(ActiveCell.Row - 1).Select
Rows(ActiveCell.Row).Copy
Rows(ActiveCell.Row + 1).Select
Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
SkipBlanks:=False, Transpose:=False
Application.CutCopyMode = False
On Error Resume Next
Cells(myRow, 1).EntireRow.SpecialCells(xlCellTypeConstants, 23).Value = ""
Cells(myRow, myCol).Select
End If
Set wks = ActiveSheet
wks.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowInsertingRows:=True, AllowInsertingHyperlinks:=True, _
AllowDeletingColumns:=True, AllowDeletingRows:=True, AllowFiltering:=True
wks.EnableOutlining = True
wks.EnableAutoFilter = True
End Sub
Alles klappt soweit, nur das ich nach dieser Routine keinr Zeilen mehr löschen kann obwohl ich das mit AllowDeletingRows:=True erlaubt habe.
Was kann das Problem sein ? Liegt das villeicht an Excel 2007 ?
Weiterhin versuche ich von dieser Routine aus eine andere Routinme mit Call SubName aufzurufen.
Das klappt nicht, ich vermute das liegt daran das diese Routine in Woorkbook und die andere in Allgemein ist, kann das ? Wie muss ich das dann machen ?
Vielen dank für Eure Hilfe
Fra