On ZDNet: Why $99 iPhone help customers

How to create macro buttons in Excel and Word

Tags: Beth Blakely

  • Save
  • Print
  • Recommend
  • 20

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.
  1. Open a new workbook.
  2. From the Tools menu, choose Customize, as shown in Figure A.

Figure A

  1. Click the Commands tab and then scroll down the left-hand Categories column and select Macros (see Figure B).
  2. 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

  1. Right-click the new button and choose Assign Macro.
  2. 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

  1. 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:
  1. Open a new document.
  2. From the Tools menu, choose Customize.
  3. 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.
  4. 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

  1. To associate an icon with this button, right-click it, choose Change Button Image, and click on any icon (see Figure E).

Figure E

  1. 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.

 
  • Save
  • Print
  • Recommend
  • 20

Print/View all Posts Comments on this article

Rating Schools of Instructional Design donnajeanfranklin@... | 03/11/02
Instructional Design Degree tomford@... | 05/08/02
Creating a macro in PowerPoint e-l | 03/14/02
Try this... Beth Blakely | 03/15/02
kriskirkwood | 05/07/02
The Answer marcrichardso71@... | 05/10/02
Help for commands TArtiles@... | 11/20/03
How to create it ragrusti@... | 03/21/02
Transporting Macros to Another Computer dlfitz | 05/09/02
Sharing macro buttons w/ shared workbook yomarty | 06/27/02
Macro Button in Excel TrainingCo-ordinator | 09/29/02
want to add a set of button to excel sheet by macro nayana4u@... | 03/12/09
Macro not available bschlaefli | 02/26/03
RE: How to create macro buttons in Excel and Word angusmdmclean@... | 04/30/08
RE: How to create macro buttons in Excel and Word angusmdmclean@... | 04/30/08
RE: How to create macro buttons in Excel and Word havaldar420@... | 04/07/09

What do you think?

White Papers, Webcasts, and Downloads

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

SmartPlanet

advertisement
Click Here