How to create macro buttons in Excel and Word
Takeaway: Toolbar buttons can streamline the use of any macros you have created to ease your administrative tasks. Use these instructions to create macro buttons in Microsoft Excel and Word.
Last week, I told you how to create a macro to insert custom headers and footers in your Excel documents. Now I'll show you how to make that macro, and any others you might create, even easier to use. You can create a custom button for your toolbar that will activate a macro in both Microsoft Excel and Microsoft Word.
Create a macro button in Microsoft Excel
The following directions were written using Microsoft Excel 2000. Instructions for other versions may differ slightly.
- Open a new workbook.
- From the Tools menu, choose Customize, as shown in Figure A.
| Figure A |
![]() |
- Click the Commands tab and then scroll down the left-hand Categories column and select Macros (see Figure B).
- You’ll see Custom Button in the Commands box. Click, hold, and drag the custom button onto any toolbar and release, as shown in Figure B.
| Figure B |
![]() |
- Right-click the new button and choose Assign Macro.
- Choose HeaderFooter and click OK. You may now change the button icon by right-clicking the button, choosing Change Button Image, and clicking on another icon, as shown in Figure C.
| Figure C |
![]() |
- Close the Customize dialog box.
You may now run your macro by clicking the button you've created. It will be available from all workbooks.
Create a macro button in Microsoft Word
Creating a macro button in Microsoft Word is similar to creating one in Excel. The following directions were written using Microsoft Word 2000. Instructions for other versions may differ slightly. Before starting the steps below, I created a macro, named PasteText, to paste unformatted text in Word documents. To create a macro button:
- Open a new document.
- From the Tools menu, choose Customize.
- Click the Commands tab and then scroll down in the Categories box and select Macros (see Figure D). You’ll see the names of any macros you've created in the Commands box on the right-hand side.
- Click, hold, and drag your macro onto any toolbar and release, as shown in Figure D. A button with the name of the macro will appear on the toolbar.
| Figure D |
![]() |
- To associate an icon with this button, right-click it, choose Change Button Image, and click on any icon (see Figure E).
| Figure E |
![]() |
- Next, right-click the button and choose Default Style. Your button will now appear as an icon only.
You may run your macro by clicking the button you've created. It will be available from all documents.
What's your favorite macro?
Have you created a great macro that others may benefit from? Send us the details in an e-mail message or post your comments below.
Print/View all Posts Comments on this article
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
White Papers, Webcasts, and Downloads
- Building the Virtualized Enterprise with VMware Iinfrastructure VMware VMware virtualization software has been adopted by over 120,000 enterprise ... Download Now
- Tom Davenport Study: Linking decisions and information for organizational performance IBM Tom Davenport's new client study looks at approaches to linking ... Download Now
- Why Isn't Server Virtualization Saving Us More? A Few Small Changes May Dramatically Increase Your Efficiency VMware Ever wonder why your company isn't saving more from its server virtualization? Making a few small changes could dramatically increase your efficiency. Download Now
- The True Costs of Virtual Server Solutions VMware Discover ways to streamline and simplify your assessment of the total acquisition costs of a server virtualization environment. Download Now
- Building the Virtualized Enterprise with VMware Infrastructure VMware This paper explains how adopting a virtual infrastructure -- comprised of server, storage, and networking virtualization technologies -- can help your organization build a sustainable competitive ... Download Now
Article Categories
- Security
- Security Solutions, IT Locksmith
- Networking and Communications
- E-mail Administration NetNote, Cisco Routers and Switches
- CIO and IT Management
- Project Management, CIO Issues, Strategies that Scale
- Desktops, Laptops & OS
- Windows 2000 Professional, Microsoft Word, Microsoft Excel, Microsoft Access, Windows XP,
- Data Management
- Oracle, SQL Server
- Servers
- Windows NT, Linux NetNote, Windows Server 2003
- Career Development
- Geek Trivia
- Software/Web Development
- Web Development Zone, Visual Basic, .NET






