L
LAF
I work on an application where when the tool is launched a new menu ite
is added, the Data menu item is removed, and some of the sub-menu item
from the other menu items are removed. For example, we use cod
similar to the following to hide a menu item when the tool i
launched:
CommandBars(1).FindControl(ID:=30003).CommandBar.FindControl(ID:=30020).Visibl
= False
We have some users that have customized their menu bar, so that the
have other items on there other than the normal File, Edit, View, etc.
When our tool is opened, their menu items that they've added are stil
there on the menu bar. When they close our application, any new men
items that they had added to the menu bar are now gone. In th
Workbook_beforeclose routine, we do the following:
Application.CommandBars(1).Reset
Call MyShowMenuItems
The MyShowMenuItems restores the submenuitems using commands like th
following:
Application.Workbooks("wwgpe.xls").CommandBars(1).FindControl(ID:=30003).CommandBar.FindControl(ID:=478).Visibl
= True
I thought the commandbars.reset was removing the customized user men
items, so I commented that line out. After making that change an
closing the application, I found that the customized user menu ite
problem is fixed and they remain on the menu bar. However, the submen
items that aren't available in the tool still are not available when th
tool is closed.
Any suggestions
is added, the Data menu item is removed, and some of the sub-menu item
from the other menu items are removed. For example, we use cod
similar to the following to hide a menu item when the tool i
launched:
CommandBars(1).FindControl(ID:=30003).CommandBar.FindControl(ID:=30020).Visibl
= False
We have some users that have customized their menu bar, so that the
have other items on there other than the normal File, Edit, View, etc.
When our tool is opened, their menu items that they've added are stil
there on the menu bar. When they close our application, any new men
items that they had added to the menu bar are now gone. In th
Workbook_beforeclose routine, we do the following:
Application.CommandBars(1).Reset
Call MyShowMenuItems
The MyShowMenuItems restores the submenuitems using commands like th
following:
Application.Workbooks("wwgpe.xls").CommandBars(1).FindControl(ID:=30003).CommandBar.FindControl(ID:=478).Visibl
= True
I thought the commandbars.reset was removing the customized user men
items, so I commented that line out. After making that change an
closing the application, I found that the customized user menu ite
problem is fixed and they remain on the menu bar. However, the submen
items that aren't available in the tool still are not available when th
tool is closed.
Any suggestions