G
Guest
Generally to disable a custom menu control, we use the following code :
Private Sub Form_Activate()
Dim mnu As Object
Set mnu = CommandBars("MyMenu2")
mnu.Controls(1).Enabled = False
End Sub
But I want to disable sub menu of a menu. to be more clear, I will write in
details :
My MenuBar Name is "MyMenu2" and Menu's is as follows :
GenMenu ReportMenu SalesMenu
EntryForm PerfoRepo VisitEntry
AllRepo Genrepo VisitRepo
SalesTar
Now I want to disable "AllRepo" Sub Menu of my GenMenu.
What additional code I should write to disable a submenu of a menu.
Could any of the professional can advise.
Thanking in advance for your advise.
Private Sub Form_Activate()
Dim mnu As Object
Set mnu = CommandBars("MyMenu2")
mnu.Controls(1).Enabled = False
End Sub
But I want to disable sub menu of a menu. to be more clear, I will write in
details :
My MenuBar Name is "MyMenu2" and Menu's is as follows :
GenMenu ReportMenu SalesMenu
EntryForm PerfoRepo VisitEntry
AllRepo Genrepo VisitRepo
SalesTar
Now I want to disable "AllRepo" Sub Menu of my GenMenu.
What additional code I should write to disable a submenu of a menu.
Could any of the professional can advise.
Thanking in advance for your advise.