Cut your work by writing Macros

Pro

7 January 2008

Writing, rather than recording, macros needn’t be a daunting task. You can reduce fiddly tasks to one mouse click, as these four examples show.

To assign a macro to a toolbar button, go to Tools, Customize, Commands and select Macros from the list on your left. Find the macro you want from the list on the right, and drag it on to a toolbar. With the Customize dialogue still open, right click on the new button and change the name to something more meaningful. Right-click again to change to ‘Default style’ – this gives you an image-only button. Right-click again to change the image from the default macro button. If you can’t see a suitable image, choose something near, then right-click once more to edit the image.

Want to enclose some text in brackets in one click? Use this macro.
Sub brackets() Selection.InsertBefore “(” Selection.InsertAfter “)

 

advertisement



 

Read More:


Back to Top ↑