ACCT 2258 EXAM 3

¡Supera tus tareas y exámenes ahora con Quizwiz!

A workbook that can include macros has the file extension _______

.xlsm

macro‐enabled templates use the file extension _______.

.xltm

If you have macros you use often, consider adding them to the Quick Access Toolbar. When customizing the Quick Access Toolbar through the Excel Options dialog, you have the option of making the change to just the open workbook. To customize the Quick Access Toolbar for the current workbook only:

1) Click the Customize Quick Access Toolbar button located at the right side of the Quick Access Toolbar. 2) Select More Commands... 3) The Excel Options dialog opens to the Customize the Quick Access Toolbar page. 4) To add a macro to the Quick Access Toolbar, expand the Choose commands from list and select Macros. Select the macro name and click the Add button. 5) To limit the customization to the current workbook, expand the Customize Quick Access Toolbar list at the right side of the dialog and select the current workbook title. 6) When you are finished customizing the Quick Access Toolbar, click OK.

To add the developer tab...

1) Click the File tab. 2) Click Options to open the Excel Options dialog. 3) Click Customize Ribbon. 4) At the right side of the Customize the Ribbon window, the Customize the Ribbon list shows all the tabs and groups available. Click the Developer check box to add the Developer tab to the Ribbon. 5) Click OK.

If you add macros or other VBA code to the workbook, you will need to save it using the Excel Macro‐Enabled Workbook ( *.xlsm) format. Excel will not save macros or other code in workbooks saved in the regular .xlsx format. To save the file in a format that supports macros:

1) Click the File tab. 2) Click Save As. 3) On the Save As page, if necessary, navigate to the location where you want to save the file. 4) Click the Save as type arrow and select Excel 5)Macro-Enabled Workbook (*.xlsm). Click Save.

To add a new comment:

1) Go to the end of the line where you want to insert the comment. 2) Press Enter twice to create a new line in the code. 3) Type an apostrophe and then type the comment text. 4) Press Enter again to place a blank line after the comment.

To run a macro...

1) If necessary, click the Enable Content button in the Message Bar to enable macros in the current workbook. 2) On the Developer tab, in the Code group, click the Macros button. 3) In the Macro dialog, click the name of the macro you want to run. Notice that a description of the purpose of the macro appears near the bottom of the dialog. 4) Click the Run button.

If you need to make a simple change to a macro, there is no need to rerecord it. Instead, you can edit the underlying VBA code in the Visual Basic Editor (VBE). To edit a macro in the Visual Basic Editor (VBE):

1) On the Developer tab, in the Code group, click the Macros button to open the Macro dialog. 2) Select the macro you want to edit, and then click the Edit button.

To record a macro...

1) On the Developer tab, in the Code group, click the Record Macro button. 2) In the Record Macro dialog, enter a name for the macro in the Macro name box. 3) If you want to create a keyboard shortcut for the macro, type the uppercase or lowercase letter in the Shortcut key box. - If you type a lowercase letter, the keyboard shortcut will be Ctrl + the letter you enter. - If you type an uppercase letter, the keyboard shortcut will be Ctrl + Shift the letter you enter. 4) By default, Excel stores the macro in the current workbook. If you want to store the macro in a new workbook instead, expand the Store macro in list and select New Workbook. Select Personal Macro Workbook to store the macro in a hidden workbook that is available whenever you use Excel. (Refer to the Tips & Tricks box for more information about using the personal workbook.) 5) In the Description box, enter a description of the tasks the macro will perform and the circumstances under which the macro should be used. 6) Click OK to begin recording the macro. 7) Excel is now recording your typing and mouse clicks to create the macro. Perform all the actions you want the macro to perform. If you make minor mistakes, you can correct them in the VBA code later. 8) When you are finished, on the Developer tab, in the Code group, click the Stop Recording button or click the Stop Recording button on the status bar.

If you use a certain macro often, consider adding a form button control to the worksheet to call it. Calling the macro from a button is also useful if you are going to use the workbook as a template. You can give the button a friendly name and other workbook users won't need to know which macro to select to run. To add a form button control to run a macro:

1) On the Developer tab, in the Controls group, click the Insert Controls button, and click the Command Button (Form Control) button. 2) Click and drag on the worksheet to draw the button. 3) When you release the mouse button, the Assign Macro dialog opens. 4) Click the name of the macro you want, and then click OK.

What is a Macro?

A macro is a custom set of programming commands written in the Visual Basic for Applications (VBA) language. Macros are often used to simplify repetitive tasks‐saving you time and effort.

The key word used to define a variable is _______________.

Dim

A loop that will allow you to run a set of VBA statements over and over again until a specified condition is met is known as a _______ __________.

Do Loop

You must click the _________ _________ button to enable macros in the workbook.

Enable Content

The last line of a user-defined function is ________ _________.

End Function

Open, BeforeSave, and BeforePrint, are examples of a(n) __________ which can be used to cause private macros to run automatically when the event occurs.

Event

A macro name is not required when creating a public macro.

FALSE

A private macro/procedure is activated by the user pressing the shortcut keys or clicking on a button.

FALSE

One way to create a new macro is to use "New Macro Wizard"

FALSE

The formula for a user-defined function must be entered in quotation marks.

FALSE

The last line of code for a user-defined function should be END SUB.

FALSE

In the Visual Basic command "ActiveWorkbook.Save", ActiveWorkbook is a(n) _______________.

Object

A macro that will run every time the file is opened is called an event-driven maro or a __________________ macro.

Private

The _________________ ________________ window in the Visual Basic Editor where you access the modules containing public macros you have created.

Project explorer

In the Visual Basic command "Selection.Font.ColorIndex=3, ColorIndex is a(n) _________.

Property

The first word in the first line of a public macro is _________.

Sub

Do...Loops are used in macros to repeat lines of code until or while a specified condition is met.

TRUE

Objects, Variables, and Methods are used to write macro code.

TRUE

The If...Then...Else...End If code allows code to be conditionally executed depending on whether a specified logical condition has been met.

TRUE

The area where macro code is displayed in Visual Basic is called the Code Window.

TRUE

When declaring a variable, "Dim" stands for "Define in memory"

TRUE

A macro that is triggered by a file being opened must be placed in _________ ________ in order for it to run properly.

This Workbook

Files that are opened from a __________ ___________ do not use Protected View and active content is allowed without requiring you to enable it each time you open the file.

Trusted location


Conjuntos de estudio relacionados

Chem Exam 2 Intext questions (ch 4-6)

View Set

Biology: Reporting Category 3- Biological Evolution and Classification Answers

View Set

Introduction to Health: Chapter 1, sec. 1-4

View Set

Body Mechanics and Mobility Aides

View Set

Environmental Science study Guide

View Set

Nursing Care of Children ATI Practice A

View Set