VB script help..please !!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to create some menus using a free bit of software - 'menumaker'.

the following script puts a new menu on the 'Worksheet Menubar'

Private Sub Workbook_Open()
Call CreateMenu
MsgBox "A new menu (MyMenu) was created.", vbInformation
End Sub

and its closed with this script

Private Sub Workbook_BeforeClose(Cancel As Boolean)
Call DeleteMenu
End Sub


but I want the new created menu to be placed on my own toolbar - called
'Lost Property Log' -

can anybody show how this can be done


Thanks
 
Hi Anthony,
You should be able to select the first module in the
menu maker project and then use Ctrl+F to find
the name of the toolbar, MyMenu, you see in Excel.
To search the entire project (workbook) you will need
to click on project library on the left of the search
dialog. Actually you would probably find it in the
CreateMenu macro which you also search for.

The "a free bit of software - 'menumaker' " is of course
John Walkenbach's
Excel Developer Tip: Creating Custom Menus
http://www.j-walk.com/ss/excel/tips/tip53.htm

A technique that makes it very easy to create a custom menu for
an Excel 97 (or later) workbook or add-in. VBA programming not
required! [Code is available so you can customize it, and
learn more about Excel VBA at you own pace]

The advantage of using the spreadsheet to load the menus as in
John's "Menu Maker" is that you can easily set up the structure
of your menus. The advantage of coding based on the MSKB
article is to have less overhead without the spreadsheet involvement.
 
Back
Top