Beim Starten meine Macros werden u.a. folende Befehle ausgeführt und funktionieren auch(!!):
Private Sub Workbook_Open()
For Each CommandBar In Application.CommandBars
CommandBar.Enabled = False
Next CommandBar
Application.Caption = "Gesundheitsstand"
Application.ScreenUpdating = False
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub
Nun sollte beim Schliessen des Files folgendes ausgeführt werden:
Private Sub Workbook_BeforeClose(Cancel As Boolean)
For Each CommandBar In Application.CommandBars
CommandBar.Enabled = True
Next CommandBar
Application.Caption = "Microsoft Excel"
Application.ScreenUpdating = True ' funktioniert nicht
Application.DisplayFormulaBar = True ' funktioniert nicht
Application.DisplayStatusBar = True ' funktioniert nicht
End Sub
Andere Sachen wie z.B. den Titel zurücksetzen, Menuleiste, etc macht er auch, nur diese drei Befehle führt er zwar aus, es tut sich aber nichts, soll heissen die Leisten bleiben ausgeblendet...
Schreib ich den Code in ein Sub in ein Extra-Modul so bleibt das Problem, hoffentlich kann mir jemand helfen!!
Danke!!
Dani