Hallo liebes Forum,
ich möchte in Excel 2007 beim Öffnen der Datei alle Menüs ausblenden oder deaktivieren.
Dazu habe ich folgende Einträge in „Diese Arbeitsmappe“ gesetzt:
Private Sub Workbook_Open()
Dim cb As CommandBar
For Each cb In Application.CommandBars
cb.Enabled = False
Next cb
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Dim cb As CommandBar
For Each cb In Application.CommandBars
cb.Enabled = True
Next cb
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
End Sub
Leider tut sich da bei mir rein gar nicht, alles ist noch zu sehen und funktioniert noch. Wo liegt mein Fehler?
Gruß