Thread: Menus
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
TK TK is offline
external usenet poster
 
Posts: 177
Default Menus

Thanks Tom

If I can indulge you with one more question:
I book marked those sites. One I think explains how to build a
"Worksheet Menu Bar" with code.
As you pointed out in your first reply building toolbars is pretty
straight forward; however, I haven't been able to replicate either
the "Worksheet Menu Bar" or the "Chart Menu Bar". Do these have
to be built with code or can they be duplicated in the customized
box.

Thanks again
TK


"Tom Ogilvy" wrote:

There is no saveAs option for commandbars. If you do the customize route,
then your changes will be saved in the .xlb file and the bar will be remain
in that customized state until someone resets it or moves/renames the .xlb
file or re-cusstomizes it.

there are many ways to go with this so maybe a little background information
might be inorder


This is a good place to start although not a tutorial:
http://support.microsoft.com/default...b;en-us;166755
File Title: Customizing Menu Bars, Menus, and Menu Items in Microsoft(R)
Excel 97
File Name: WE1183.EXE
File Size: 58041 bytes
File Date: 06/20/97
Keywords: kbfile kbappnote
Description: This Application Note can help you learn techniques for writing
Visual Basic(R) for Applications code to customize menus in Microsoft Excel
97. This Application Note contains code examples that you can use with the
following elements: menu bars, menus, menu items, submenus, and shortcut
menus.

http://msdn.microsoft.com/library/of...97/web/008.htm
MS Officer 97 Programmer's Guide
Chapter 8: Menus and Toolbars

Here is an article about creating commandbars with code:
http://msdn.microsoft.com/library/techart/ofcmdbar.htm

http://support.microsoft.com/default...02&Product=xlw
How to customize menus and menu bars in Excel

http://support.microsoft.com/?id=159619
XL97: Sample Macros for Customizing Menus and Submenus

http://support.microsoft.com/?id=213550
XL2000: Sample Macros for Customizing Menus and Submenus

--
Regards,
Tom Ogilvy


"TK" wrote in message
...

Thanks Tom

I think I need more of a stick by stick procedure. Say for example
I wanted to customize Worksheet Menu Bar, I think I choose
View/Toolbars/customize then Worksheet Menu Bar then new, delete
the controls not needed and save it as "NewMenu" for example.
The next step:
I assume it is loaded in the Workbook Open and deleted in the Workbook
close sommthing like?
Private Sub Workbook_Open()
Application.CommandBars("NewMenu").Visible = True
End Sub

Now will the original menus load the next time Excel loads if this

workbook
is not opened?

Thanks
TK




"Tom Ogilvy" wrote:

If you are customizing the existing worksheet menu bar, then just don't
remove the controls you want to retain.

If you are building new "worksheet menu bar", then just add the standard
controls you want to use.

--
Regards,
Tom Ogilvy

"TK" wrote in message
...
Hi:
In an effort to make a workbook less intimidating
I would like to make invisible (actually removed not
dimmed) all Toolbars including the Worksheet Menu Bar
and Formula Bar when a workbook is opened then display
a customized Worksheet Menu Bar and Standard Menu Bar.
At the workbook close I world like to restore (not reset)
the users menu setup.
I know how to add and delete Worksheet Menu Items and
create toolbars with VBA but isn't there a way to use or retain
and use the basics such as File/save and Tools/Spelling without
writing code or macros for each one.

Thanks
TK