ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   VB script help..please !! (https://www.excelbanter.com/excel-worksheet-functions/29296-vbulletin-script-help-please.html)

Anthony

VB script help..please !!
 
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

Ron de Bruin

Hi Anthony

See this KB
http://support.microsoft.com/default...02&Product=xlw

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Anthony" wrote in message ...
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




David McRitchie

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.
---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm

"Ron de Bruin" wrote
See this KB
http://support.microsoft.com/default.aspx?scid=kb;en-us;830502&Product=xlw

"Anthony" wrote in
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

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





All times are GMT +1. The time now is 06:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com