Marvs,
Could you disable the menu command with the .disabled method (see line 14 of
example code below), then only set .enabled = true once the user inputs a
correct password via an INPUTBOX?
Here's an example of how I did the disabling
Hope this helps
Pete
Sub AA_InsertMenu()
Dim cmbNewMenu As CommandBar
Dim ctlPopup As CommandBarPopup
Application.CommandBars("Menu Bar").Reset
Set cmbNewMenu = Application.CommandBars("Menu Bar")
With cmbNewMenu.Controls
'---------------------------------
'Add "SysMan" menu to the Menu Bar
'---------------------------------
Set ctlPopup = .Add(Type:=msoControlPopup, Before:=9)
With ctlPopup
.Caption = "&Sysman"
.Enabled = False
'----------------------------------------------------------
'Add "Print", "Save" and "Plan" menu items to "SysMan" menu
'----------------------------------------------------------
With .Controls.Add
.Caption = "&1 Filter Core Tools"
.OnAction = "FilterDisplayCoreTools"
End With
With .Controls.Add
.Caption = "&2 Filter Service Management"
.OnAction = "FilterDisplayServiceMgt"
End With
With .Controls.Add
.Caption = "&3 Filter Software Management"
.OnAction = "FilterDisplaySoftwareMgt"
End With
With .Controls.Add
.Caption = "&4 Filter Storage Management"
.OnAction = "FilterDisplayStorageMgt"
End With
With .Controls.Add
.Caption = "&5 Filter General"
.OnAction = "FilterDisplayGeneral"
End With
With .Controls.Add
.Caption = "&6 Plan Core Tools"
.OnAction = "Plan_01_CoreTools"
End With
With .Controls.Add
.Caption = "&7 Plan Service Management"
.OnAction = "Plan_02_ServiceMgt"
End With
With .Controls.Add
.Caption = "&8 Plan Software Management"
.OnAction = "Plan_03_SoftwareMgt"
End With
With .Controls.Add
.Caption = "&9 Plan Storage Management"
.OnAction = "Plan_04_StorageMgt"
End With
With .Controls.Add
.Caption = "&0 Plan General"
.OnAction = "Plan_05_General"
End With
With .Controls.Add
.Caption = "E&xport file for Timesheet System"
.OnAction = "TAPlan"
End With
With .Controls.Add
.Caption = "&Save this Plan"
.OnAction = "SaveAll"
End With
End With
End With
End Sub