Printer Friendly
The Free Library
14,503,364 articles and books
Member login
User name  
Password 
 
Join us Forgot password?

Automate shortcuts.


Create custom menus to make applications more efficient.

Accountants spend hours working at computers, and usually much of that time they're doing repetitive tasks--such as opening the same group of spreadsheets or creating the same header or formatting for each new workbook work·book  
n.
1. A booklet containing problems and exercises that a student may work directly on the pages.

2. A manual containing operating instructions, as for an appliance or machine.

3.
 and document. Wouldn't it make sense to invest a little time to create programs that perform these repetitive jobs with just a click of a mouse button?

Although I'll show you how to create shortcuts--also known as macros--in Excel, you can use the same general procedures to create them in Word and many other applications.

But before creating the macros, I'll show you how to create custom menus--convenient places to store the macros. In fact, if you develop many macros, you will probably want to also create a few custom menus--one for each group of macros and maybe some for various projects that use a unique set of macros.

To start, I will create a menu called Jeff that will contain two macros: One will open a chart of accounts workbook and the other will create a standard workbook header. Once it's completed, here's what the Jeff custom menu will look like after it's installed in the taskbar An on-screen toolbar that displays the active applications (tasks). Clicking on a taskbar button restores the application to its previous appearance. Windows 95 popularized this feature. See Win Taskbar.  (see exhibit 1, below):

[ILLUSTRATION OMITTED]

Notice that when the Jeff menu is highlighted, a message pops up that lists all the macros it contains--in this case Open Chart of Accounts Workbook and My Standard Workbook Header. Notice also that each macro has one underlined letter--the O in Open Chart of Accounts Workbook and the M in My Standard Workbook Header. A fast way to evoke e·voke  
tr.v. e·voked, e·vok·ing, e·vokes
1. To summon or call forth: actions that evoked our mistrust.

2.
 a macro is to hold down the Alt key A keyboard key that is pressed with a letter or digit key to command the computer. For example, in Windows, holding down the Alt key and pressing F displays the File menu if it is a current option on screen. Pressing Alt-Tab toggles between applications. See Flip 3D.  while simultaneously striking the underlined letter: in this case Alt + O.

MENU MAKING

To create the Jeff custom menu, click on Tools, Customize. Then click on the Commands tab, and under the Categories list click on New Menu, as shown in exhibit 2, at right.

[ILLUSTRATION OMITTED]

Now, using the mouse, drag New Menu from the Commands box up into the Excel menu bar, as already shown in exhibit 1.

To name the new menu, leave the Customize box open, right-click on the new custom menu and type whatever name you wish to give it in the Name field, as shown in exhibit 3, at right. When you add an ampersand The ampersand (&) normally means "and" as in Jones & Company. However, in the computer world, it is used in various ways. In Windows, it is used as a code to precede an underlined character.  (&) in the menu name, the letter following the ampersand automatically is underlined, and that produces the shortcut (1) In Windows, a shortcut is an icon that points to a program or data file. Shortcuts can be placed on the desktop or stored in other folders, and double clicking a shortcut is the same as double clicking the original file.  (Alt + underlined letter following the &) for evoking it.

[ILLUSTRATION OMITTED]

Now I'll set up the macros in the menu. While still in the Categories menu, click on Macros, which is two items above New Menu, as shown in exhibit 4, at right.

[ILLUSTRATION OMITTED]

Drag Custom Menu Item from the Commands box to your new custom menu in your tool bar, as shown in exhibit 5, page 37.

[ILLUSTRATION OMITTED]

Rename Re`name´   

v. t. 1. To give a new name to.

Verb 1. rename - assign a new name to; "Many streets in the former East Germany were renamed in 1990"
 Custom Menu Item by right-clicking and typing Open Chart of Accounts Workbook. Repeat these steps to set up the My Standard Workbook Header menu item. Once that's done the custom menu should look like exhibit 1.

MACRO MAKING

The next task is to develop specialized macros. There are two ways to do this: writing the macro code or using the Record New Macro tool. I'll show you how to do both. But before starting, it's important that you understand how to organize them.

Macros are simply lines of text, or code, in a programming language called Visual Basic that Excel reads and then executes. The code is saved directly in workbooks. So we can see the code, Excel provides a special "viewer" called the Visual Basic Editor. Since the code can be saved in any workbook and performs tasks in other workbooks, it's handy to save all of the macros in one workbook that contains only macros.

For the purposes of this exercise, create a workbook called Jeffs book of macros.xls; that's where you should store them all. (Notice that the apostrophe apostrophe, figure of speech
apostrophe, figure of speech in which an absent person, a personified inanimate being, or an abstraction is addressed as though present.
 in Jeffs was omitted: That's because VBA (Visual Basic for Applications) A subset of Visual Basic that provides a common language for customizing Microsoft applications. VBA supports COM, which allows a VBA script to invoke internal functions within Excel, Word and other COM-based programs or to make use of  programming sometimes misreads the apostrophe sign, so for safety sake it's left out.) When this workbook is open, you can evoke any of the macros it contains.

To record the first macro, select Tools, Macros, Record New Macro. Name this macro my_header and click on OK, as shown in exhibit 6, at right.

[ILLUSTRATION OMITTED]

While Excel is recording your keystrokes, set up a standard header by typing the text and applying the desired formatting. My standard header resembles exhibit 7, at right.

[ILLUSTRATION OMITTED]

When you are finished creating the header, press the Stop Recording Button, as shown in exhibit 8, at right.

[ILLUSTRATION OMITTED]

To enhance your skill in macro writing, I'll also show you how to write the macro by hand--instead of using the macro recording feature. To get into the macro editor, select Tools, Macros, Visual Basic Editor. You will see the macro you just recorded, my_header, which is stored in Module1 as shown in exhibit 9, below.

[ILLUSTRATION OMITTED]

To write the new macro, type:
Sub open_chart().
Workbooks.Open "c:\my documents\chart.xls"
End Sub


Note that the open_chart macro assumes a workbook named chart.xls exists in the c:\my documents folder In a graphical user interface (GUI), a simulated file folder that holds data, applications and other folders. Folders were introduced on the Xerox Star, then popularized on the Macintosh and later adapted to Windows and Unix. In Unix and Linux, as well as DOS and Windows 3. . After typing the open_chart macro, you should have two macros saved in the Jeffs book of macros.xls workbook. Save the workbook and exit the Visual Basic Editor.

The next step is to assign the macros to the custom menu. Click on Tools, Customize, and then right-click on the Open Chart of Accounts Workbook menu item and select Assign Macro, as shown in exhibit 10, at right.

[ILLUSTRATION OMITTED]

In the Assign Macro dialogue box, select the open_chart macro as shown in exhibit 11, at right. If no macros appear in the dialogue box, it's probably because you failed to open the workbook that contains the macros Jeffs book of macros.xls.

[ILLUSTRATION OMITTED]

REPEAT THE PROCESS

Following the same procedure, assign the my_header macro to the My Standard Workbook Header menu item. Now that the macros are assigned, close the Customize dialogue box and you can start to use the menus.

To make the macros available at all times, instruct Excel to open the Jeffs book of macros.xls whenever the application is launched. To do that, using Windows Explorer See Explorer. , move the workbook to the c:\program files\microsoft office Microsoft's primary desktop applications for Windows and Mac. Depending on the package, it includes some combination of Word, Excel, PowerPoint, Access and Outlook along with various Internet and other utilities. \office\xlstart folder. Any workbook in this folder is automatically opened when Excel is started.

Finally, hide this workbook so it isn't visible while you are working in Excel. To do this, open Jeffs book of macros.xls and select Hide from the Window menu, as shown in exhibit 12, at right.

[ILLUSTRATION OMITTED]

Save changes to Jeffs book of macros.xls and exit Excel. Whenever Excel is launched that file will automatically open, but it will be hidden.

Now that you know the basics of establishing custom menus, you can automate almost any task in any application and launch it quickly with just a few mouse clicks.

Key to Instructions

To help readers follow the instructions in this article, we use two different typefaces This is a list of typefaces. Serif
Here you can find a graphical version of this table.
  • Aldus
  • Antiqua
  • Aster
  • Baskerville
  • Bell (Monotype) Didone classification serif type deisgned by Richard Austin, 1788
  • Bembo
  • Benguiat
.

Boldface See boldface font.  type is used to identify the names of icons, agendas and URLs.

Sans serif Short horizontal lines added to the tops and bottoms of traditional typefaces, such as Times Roman. Contrast with sans-serif.

 type indicates commands and instructions that users should type into the computer and the names of files.

An Invitation

If you have a special how-to technology topic you would like the JofA to consider for inclusion in this series, or an application shortcut you devised and would like to share with other professionals, contact Senior Editor Stanley Zarowin. His e-mail address See Internet address.

e-mail address - electronic mail address
 is zarowin@mindspring.com.

JEFF LENNING, CPA (Computer Press Association, Landing, NJ) An earlier membership organization founded in 1983 that promoted excellence in computer journalism. Its annual awards honored outstanding examples in print, broadcast and electronic media. The CPA disbanded in 2000. , is the founder of Click Consulting, Seal Beach Seal Beach, city (1990 pop. 25,098), Orange co., S Calif., on the Pacific coast; inc. 1915. It is a beach city with an active art colony. Transportation equipment and concrete are among the city's manufactures. U.S. naval stations are nearby. , California, which specializes in custom Microsoft Excel (tool) Microsoft Excel - A spreadsheet program from Microsoft, part of their Microsoft Office suite of productivity tools for Microsoft Windows and Macintosh. Excel is probably the most widely used spreadsheet in the world.

Latest version: Excel 97, as of 1997-01-14.
 and Access application development, training and tech support. His e-mail address is consulting@lenning.com. The sample files demonstrated in this article are available for download at www.clickconsulting. com. Click on Downloads.
COPYRIGHT 2001 American Institute of CPA's
No portion of this article can be reproduced without the express written permission from the copyright holder.
Copyright 2001, Gale Group. All rights reserved. Gale Group is a Thomson Corporation Company.

 Reader Opinion

Title:

Comment:



 

Article Details
Printer friendly Cite/link Email Feedback
Title Annotation:custom menus to make applications used in accounting more efficient.
Author:Lenning, Jeff
Publication:Journal of Accountancy
Geographic Code:1USA
Date:Jul 1, 2001
Words:1317
Previous Article:When the client wants to leave it to the cat.(unusual bequests; leaving property to pets)
Next Article:A new look at the attestation standards.(Auditing Standards Board Statement on Standards for Attestation Engagements)
Topics:



Related Articles
Managing traffic overseas: software for tracking international trade deals. (Buyers Guide)
Yes, you can program in VBA.(Visual Basic for Applications)
Make your mark in spreadsheets.(using Excel software tools in auditing)
Linux-Mandrake 7.2. (IT News).(Brief Article)(Product Announcement)
XI SOFTWARE LAUNCHES TIMEAGENT 2.0.(Product Announcement)
Technology Q&A: control Excel's underline function ... learn the nuances of AutoFill ... put worksheets in separate panes ... an easy way to...
Jasc Paint Shop Pro 8 public beta. (IT News).(Brief Article)
Data menus at your fingertips: how to make a challenging information application easy to use.
Get easy access to Outlook's calendar.(Technology Q&A)

Terms of use | Copyright © 2009 Farlex, Inc. | Feedback | For webmasters | Submit articles