How to create a button in the Excel toolbar for ...

jamshoot

Board Regular
Joined
Oct 15, 2009
Messages
199
Hi all

Can someone teach me how to create a button in the Excel toolbar so that when I click it, it will open a worksheet named "My WS.xls" residing in c:\My Folder\.

Cheers
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Hi there,

Create a new module and insert the following macro:

Code:
Sub openWB()
    Workbooks.Open Filename:="C:\My Folder\My WS.xls"
End Sub
(Alt + F11 -> Insert -> Module -> Paste the above)

Then in Excel, right click on any toolbar and click on "Customize". Scroll down to Macros and click and drag anywhere in the toolbar space either the Custom Button with the smily face or the one with just text.

Once dragged onto a toolbar, right click on the new button and click "Assign Macro" and find your "openWB" macro you created earlier.

You can create a new image for your button, and set it to show Text and Image if you want.
 
Upvote 0
Hi JamesW

Thks for the quick reply. It works perfect.
Btw, u mentioned ... "You can create a new image for your button, and set it to show Text and Image if you want.", may I know how to do that.
Let say , I want to change the smiley round image & have text when the cursor hover on it ?

Cheers
 
Upvote 0
Not sure about changing the text when you hover over it, but for the other stuff:

Right click on the button, click on Customize, right click on the button again and click either Change button image (choose a default one) or edit button image (create your own).

Make sure Image and Text is selected also.
 
Upvote 0
Hi JamesW

Great ... managed to change the icon & text.
The icon selection is quite limited. It would be great if anyone in this forum can share how to add or create customized icon.

Thanks JamesW

Cheers
 
Upvote 0
Edit button image will allow you to create your own. The more artistic you are, the better it will look (mine look like a 5 year old has gone mental with the mouse!)
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,843
Members
452,948
Latest member
UsmanAli786

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