Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to add a menu item to excel application?

Status
Not open for further replies.

maswien

Technical User
Sep 24, 2003
1,286
CA

Hi,

I wrote a form in the VBA Excel, I want start it from the
menu of Excel, How can I do that?

Thanks
 
Mija,

Go to view, toolbars, customize,
under categories, go to forms,
under commands, go to code.

hope this helps,

S
 

Hi mija,

I think you'll have to create a Module that will
load and show your form. For example:

Sub Launch_myForm()
Load MyForm
MyForm.Show
End Sub

This is something I actually did. You can add a menu
using View > Toolbars > Customize... > then clicking
on the "Commands" Tab and adding a "New Menu". Note:
you may also need to add a New 'Sub' Menu under the
"New Menu". Once done, click "Modify Selection" to
name your menu and add your Macro (Module). Hope
this helps.

Regards,

T Y H A N D
 
Hi lemonhalls,

I think that's for customize the toolbar, what I want to do is start the form from excel menu at run time.
 
Thanks tyhand,

It seems my excel has something wrong, when I goto view->Toolbars->customize, I can click "New" button in the tab "toolbars", then I goto tab "commands", I can see there
is a "New Menu" on the left, when I click the "New Menu" on the right side, it seems Excel won't let me change anything, this interface seems not editable, what's wrong with my excel or I should configure it to make it working?

 
mjia,

Once you select "New Menu" continue to hold down the mouse button and pull the Menu item to where you would like it located on the menu bar at the top of the screen.

Fred
 

founddryqa,

I hold down the mouse and pull the menu to the main menu of exce of excel - "Tools", then every time I open the excel I found the menu "Tools" is gone, it's not what I want. How can I bring the menu "Tools" back?
 
mjia,

There are a couple of ways. (I hope I remember all of the steps) What I did was create a menu in a workbook and then saved the workbook as an add-in. Then go into tools add-ins and browse for the selection and select it as an add-in.

In the workbook that was saved as an add-in, I used the code and worksheet from this website, because it made creating the menu and linking it to code easy.


Hope this helps,

Fred
 

Hey Mija,

Are you dragging the "New Menu" to your Main Menu bar?

From the Command Tab in the "Categories:" section (window pane on the left), highlight "New Menu". Then in the
window pane "Commands:" (on right), click and drag "New
Menu" all the way to your Excel's Main menu bar. Close
Excel then open it again and you'll see that your "New
Menu" should still be there.

- T Y H A N D
 

I think the right way to do it is to use add-in as foundryqa suggested. If only change the setting in the
toolbar-> customerize, the new menu may only appear when
you open the excel in this machine, if you copy the excel
file to other machine, you won't see the new menu. So I guess I should use add-in.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top