Ist es möglich Tabellenblätter nur mit Passwortabfrage zu löschen?
Wenn ja BITTE eine Anleitung.
Danke Heinz
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call CmdDelete
End Sub
Private Sub Workbook_Open()
Dim oBar As CommandBar
Dim oBtn As CommandBarButton
Call CmdDelete
Set oBar = Application.CommandBars.Add( _
Name:="MyFiles", _
Position:=msoBarTop, _
MenuBar:=True)
Set oBtn = oBar.Controls.Add
With oBtn
.Caption = "Laden"
.Style = msoButtonCaption
End With
Set oBtn = oBar.Controls.Add
With oBtn
.Caption = "Speichern"
.Style = msoButtonCaption
End With
Set oBtn = oBar.Controls.Add
With oBtn
.Caption = "Erstellen"
.Style = msoButtonCaption
End With
Set oBtn = oBar.Controls.Add
With oBtn
.Caption = "Zurück"
.OnAction = "CmdDelete"
.Style = msoButtonCaption
End With
Set oBtn = oBar.Controls.Add(ID:=178)
Application.DisplayFullScreen = True
oBar.Visible = True
End Sub
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
Dim neuer_Blattname As String
If Target.Address = "$A$6" Or Target.Address = "$A$52" Then
neuer_Blattname = Range("A6") & " bis " & Range("A52")
ActiveSheet.Name = neuer_Blattname
End If
End Sub