Download presentation
Presentation is loading. Please wait.
Published byDoris Day Modified over 8 years ago
1
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Microsoft® Excel 2013
2
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. 2
3
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. A macro is a sequence of commands and keystrokes that automate a routine task. Excel macros are recorded in Visual Basic for Applications programming language (VBA).
4
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Macros are stored in macro-enabled workbooks. The file name extension for a macro- enabled workbook is xlsm. You can set how macro-enabled workbooks are opened in the Trust Center. Macros must be enabled to be used.
5
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved.
6
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. The Macros button is on the View and the Developer tabs. The Macro dialog box lists existing macro names.
7
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. 7
8
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Macros can be edited in the Visual Basic Editor. The shortcut to open the Visual Basic Editor is [Alt + F11]. Code window Project Explorer Properties window
9
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. The first lines in a macro include the macro name and comment lines. A subroutine macro is run from within the workbook. Comment lines are preceded by an apostrophe and shown in green. A keyboard shortcut may also be indicated.
10
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Spaces and punctuation are part of the macro code and should not be changed. Simple format and text changes are relatively easy to determine. You must resave the workbook to save edits made in the Visual Basic Editor.
11
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. You can change the font size by keying a new size. Add text by clicking to place an insertion point and keying the new data.
12
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. You can insert your own comment lines in a macro. Key an apostrophe to precede the line.
13
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Choose File and Print from the Visual Basic Editor menu to print macro code.
14
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. 14
15
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Macros are recorded and saved in a macro-enabled workbook. You first name a macro and then perform the actual steps for the task. A macro is usable whenever the workbook is open.
16
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. The Macros button is on the View command tab. The Code group is on the Developer command tab. There is a Record Macro button in the status bar.
17
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Macros names must begin with a letter. Macro names cannot include spaces or special characters. All macro shortcuts include [Ctrl]. You should use uppercase letters for keyboard shortcuts.
18
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. In the Record Macro dialog box, you can name the macro, assign a shortcut, and key a description.
19
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Special-purpose macros are used with one workbook and should be stored in that workbook. General-purpose macros can be stored in a workbook that contains only macros. Anytime this workbook is open, any other open workbook can use its macros.
20
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. While you are recording a macro, the status bar shows a Stop Recording button. Click this button when you complete the steps. There is a Stop Recording button on the Developer command tab.
21
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. Macros are recorded with absolute or relative references. The Relative References button is an on/off toggle. With relative references, the macro records pointer movement commands. You must position the pointer before running the macro.
22
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. With absolute references, the macro records ending cell addresses. Pointer movement is not recorded. The pointer can be anywhere when the macro is run.
23
a lesson approach © 2011 The McGraw-Hill Companies, Inc. All rights reserved. After your finished typing the notes, complete Exercise 16-26 on page 708-709 Add a header with the following: NameLessonExercise 23
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.