View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Richard m Richard m is offline
external usenet poster
 
Posts: 1
Default Worksheet menu bar using code????


I am trying to create a custom Main Menu for a spreadsheet.
I can install macro in the thisworksheet, workbook to edit th
Worksheet menu bar and when the spreadsheet opens, it will edit th
main menu. But...




- I have not been successfull in reseting the worksheet menu bar whe
the spreadsheet closes. How do you reset the Worksheet menu bar whe
you click the close box?
- Can a custom worksheet menu bar be created and attached to wor
with only one spreadsheet? And how?



Here is the code I am playing with to develop a custom menu. The secon
sub is not working.


Code
-------------------

Private Sub Workbook_Open()
Application.CommandBars("Tools").Controls(2).Delet e

End Sub

Private Sub Application_WorkbookBeforeClose(ByVal playmenu As Workbook, _
Cancel As Boolean)
Application.CommandBars("Tools").Controls.Add Type:=msoControlButton, ID:= _
793, Befo=2



End Sub

-------------------


-----------------------------------------------
~~ Message posted from http://www.ExcelTip.com
~~View and post usenet messages directly from http://www.ExcelForum.com