AW: Symbolleisten verschwunden?
tobias
Hallo
du kannst sie unter Ansicht-Symbolleisten wieder einblenden.
Hier noch wie man mit VBA Symbolleisten ei und ausblenden kann:
Option Explicit
Private visibleCommandBars As New Collection
Private Sub Workbook_Open()
Dim cb As CommandBar, c As CommandBarControl
On Error Resume Next
Application.CommandBars("Benutzerdefiniert 1").Visible = False
Set cb = Application.CommandBars.Add(Name:="NeuMenu", MenuBar:=True, Position:=msoBarTop)
For Each c In Application.CommandBars("Benutzerdefiniert 1").Controls
c.Copy cb
Next
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
Application.CommandBars("Benutzerdefiniert 1").Delete
Application.CommandBars("Benutzerdefiniert 1").Visible = False
Application.CommandBars("NeuMenu").Delete
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
End Sub
Private Sub Workbook_Activate()
Dim cb As CommandBar
On Error Resume Next
Application.CommandBars("NeuMenu").Visible = True
For Each cb In Application.CommandBars
If cb.Type = msoBarTypeNormal And cb.Visible = True Then
visibleCommandBars.Add cb, cb.Name
cb.Visible = False
End If
Next
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub
Private Sub Workbook_Deactivate()
Dim cb As Object
On Error Resume Next
Application.CommandBars("NeuMenu").Visible = False
For Each cb In visibleCommandBars
cb.Visible = True
Next
Set visibleCommandBars = Nothing
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
End Sub
mfg tobias