Creating a Menu

StevenD

Active Member
Joined
Nov 17, 2004
Messages
262
Hi,

I would like to be able to create a menu that will appear everytime i open a new workbook (open excel).

How would I do this?

Thanks

Steve
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Have you looked at the help? What would you put on the menu? Do you have experience of VBA?
 
Upvote 0
Hi Glenn,

Yes i do have experience of VBA.

I use the following code normally, but don't think it would work without this book open.



Code:
Public Sub SetupMenu()
Dim newMenu, newMenuItem
newMenu.Caption = "&Projects"
Set newMenuItem = newMenu.Controls.Add(Type:=msoControlButton)
newMenuItem.Caption = "&Open Project Log"
newMenuItem.OnAction = "Log"
With CommandBars("worksheet menu bar")
Set newMenu = .Controls.Add(Type:=msoControlPopup, before:=.Controls("window").Index, temporary:=True)
End With
End Sub

Do i need to write this code and the sub it calls (Log), in the default workbook that the menu is there ecerytime you open excel?

thanks

Steve
 
Upvote 0
I'm not sure about the VBA code, but when I made my own Menu I used the menu maker at this link. http://www.j-walk.com/ss/excel/tips/tip53.htm

When I had modified the menu to my own things, I changed the code so that the message about creating a new menu didn't come up everytime you opened the menu maker file.

Once I'd done that, I saved the menu maker file in the XLStart folder in my Office files in Program Files so that it opens everytime I open Excel and automatically makes my menu.

The only problem with doing that is, you see the menu maker everytime excel opens so I clicked Window and Hide and saved it when I closed. Now the menu maker doesn't appear when I load Excel but it loads my menu.

I know it's not the most professional way to make a menu but it works.

I'm sorry I can't help you with the code because I'm not too good with VBA code... that's why I come here for help everyday! :oops: :p
 
Upvote 0
Many thanks for your help.

I also found I had to make excel point to the XLstart folder, by going to tools, options, general.
 
Upvote 0

Forum statistics

Threads
1,213,538
Messages
6,114,218
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top