Microsoft Office Tutorials and References
In Depth Information
Example 12-17. The DeleteCustomMenus Procedure
The DeleteCustomMenus procedure is shown in Example 12-17 .
Example 12-17. The DeleteCustomMenus Procedure
Sub DeleteCustomMenus()
Dim cbc As CommandBarControl
Set cbc = Application.CommandBars("Worksheet menu bar"). _
FindControl(Type:=msoControlPopup, Tag:="TestAddInCustomMenu")
If Not cbc Is Nothing Then cbc.Delete
Set cbc = Application.CommandBars("Chart menu bar"). _
FindControl(Type:=msoControlPopup,
Tag:="TestAddInCustomMenu")
If Not cbc Is Nothing Then cbc.Delete
End Sub
The pieces are now complete, so you can save the SRXUtils.xls file as an add-in, just as we did in
Chapter 10 . (If you have a problem, you can download the source code for this add-in from the
O'Reilly web site and compare it with your code.)
 
 
Search JabSto ::




Custom Search