Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

New Toolbar Button

  Asked By: Gene    Date: Nov 04    Category: MS Office    Views: 581
  

Is there a way to add custom buttons to a menu bar in Excel? I have
created a small program that I will be using very often and I would
like to add it to one of the toolbars. I have looked, but I can't find
what I am looking for or what I am expecting. Can anyone make a
suggestion?

Share: 

 

5 Answers Found

 
Answer #1    Answered By: Fabia Ferrrari     Answered On: Nov 04

I assume you mean a macro. If you want it to always be available,
you should save it in your Personal.xls workbook. I can tell you how to add  a
custom button  to a regular toolbar  in Excel 2003 (not sure how different the
steps are for 2007):

At the right end of all the built-in toolbars  there is a small  down arrow with
the tooltip "Toolbar Options". On the toolbar you want to modify, click that
down arrow. On the menu  that pops up, select "Add or Remove Buttons", then
"Customize..." The Customize dialog appears. On the Commands tab, scroll down
through the Categories and click on Macros. You will see "Custom Button" (next
to a smiley face) in the Commands box. Drag the smiley face icon onto the
toolbar where you want it to appear and release it. Right-click on the new
toolbar item and a menu appears. Assign the macro to run when this button is
clicked, change the button image, give the button a name (used for its tooltip),
etc. Finally, click Close on the Customize dialog.

 
Answer #2    Answered By: Anuja Shah     Answered On: Nov 04

Yes, thank you. I got the macro into a button  and the button onto a
custom bar  as suggested. Now, I need to be able to use it on all my
spreadsheets. As I have it now, it re-opens the original workbook
when I use the button. Is there a way to avoid this?

Also, can this macro be saved independantly and then transported to
a different computer for others to use, or will I need to transport
the workbook?

 
Answer #3    Answered By: Emma Campbell     Answered On: Nov 04


The way to avoid Excel opening the original workbook when you run the macro is
to put the macro in your Personal.xls workbook and attach the button  to it
there. Search Google for 'personal.xls' and you will find all the information
you need, including this link to Linda Johnson's site:
http://personal-computer-tutor.com/personalxls.htm

You could distribute your macro as an Excel add-in. Search Google for 'create
Excel add-in' and you can choose from many tutorials on the subject.

 
Answer #4    Answered By: Kellie Bishop     Answered On: Nov 04

I think there's a lot of things to be considered with this!

If you put it into your personal.xls file, no one else can use it.
If you put it in a workbook and save it as an xla file, then when
users open the "add-in", excel  copies the file to their local space.
This is a problem if you plan to upgrade, add  to, or improve the macro.
The users of the add-in will not receive the changes.

another option is to pursue defining the commandbar in vba, then
putting the macro for the command bar  in the Workbook_Open event,
or the Auto_Open macro.

 
Answer #5    Answered By: Mona Wagner     Answered On: Nov 04

Its very easy follow the following simple stemps

Step-I

Select Tools>Customize>ToolBars

Select "New" button/bar appearing at the right side

Fill/Give a name to the newly created emptry tool bar  that will be of
your own and not of excel  built-in ones.

Click OK

Select/click the square i.e. select this new bar to appear alongwith
other tool bars or somewhere on the screen

Step-II

Tools>Customize>Commands (this time Commands and not ToolBars)

From the categories list select "Micros"

From the Command List of "Micros" catogary appearing on the right side
drag either Custom Menu item or Custom button  (yellow in color) to your
newly created toolbar

Step-III

Immediately after dragging the Custom Button to your tool bar right
click it.

Select last item - Assign Micro

Select the Micro name of your program  from the list

press OK

From now onwards your program should run whenever you click/press this
button.

For changing the options or even the button do the following

While/After selecting Tools and then Customize (Tools>Customize)

right click the button you can change the name of the button, Edit or
Change the button itself and u can do with many options available and
continue

Hope the above will help u

In case of difficulty please send your worksheet

I have learnt the above procedure from Help

You may frequently use Help for all your qurries to improve

 
Didn't find what you were looking for? Find more on New Toolbar Button Or get search suggestion and latest updates.




Tagged: