Gruppe
Menue
Problem
In jeder aktiven Arbeitsmappe soll im Zell-Kontextmenü der Menüpunkt "Zelle einfügen..." deaktiviert sein.
ClassModule: DieseArbeitsmappe
Private Sub Workbook_BeforeClose(Cancel As Boolean)
On Error Resume Next
Application.CommandBars("Cell") _
.Controls("Zellen einfügen...").Enabled = True
On Error GoTo 0
End Sub
Private Sub Workbook_Open()
Set app.xlApp = Application
End Sub
ClassModule: clsApp
Public WithEvents xlApp As Application
Private Sub xlApp_WindowActivate(ByVal Wb As Workbook, ByVal Wn As Window)
On Error Resume Next
Application.CommandBars("Cell") _
.Controls("Zellen einfügen...").Enabled = False
On Error GoTo 0
End Sub
StandardModule: basMain
Public app As New clsApp