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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

button on toolbar (only with excel workbook) 1

Status
Not open for further replies.

gusset

Technical User
Mar 19, 2002
251
0
0
GB
i have a workbook which some of my team will use. i'd like that workbook to have a button on a toolbar which runs a macro in that workbook.

but i don't want the button (or the toolbar) to appear with other workbooks.

i'm not familiar enough with the excel interface to know how to achieve this.

can anyone assist?

many thanks

gusset
 
Assuming the macro has already been written.

1) Go to Tools - Customize.
2) Commands tab
3) Click on Macros in Categories
4) Click on, while keeping left button down, Custom Button
5) Drag the small rectangle to toolbar where you want to put it
6) You'll see an I beam -- which is where it will place the custom button when you release the left mouse button
7) To assign a macro to this button, right click the smiling face icon and go all the way to the bottom of items - Assign a Macro.
 
thanks, but the button stays on the toolbar if i close the workbook or open another!

gusset
 
Then bring up the Forms toolbar.
Select Button control.
Second row, second item.
Draw Button somewhere on the sheet.
Should ask you to assign a macro.
 
there would be no problem if i wanted it on the sheet!

do you say it can't be done?

gusset
 
i think it will ("Attach Custom Toolbars to Microsoft Excel Workbooks and Templates").

thanks, BenRowe.

best wishes

gusset
 
You could set the spreadsheet to create the button on opening and delete it on closing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top