Microsoft Excel 2010 Expert — Question 21
You work as an Office Assistant for Blue well Inc. The company has a Windows-based network. You want to create a VBA procedure for the open event of a workbook. You are at the step of adding the following lines of code to the procedure:
"Private Sub Workbook_Open() MsgBox Time Worksheets("Sheet2").Range("A2").Value = Time End Sub"
Which of the following are the next steps that you will take to accomplish the task? Each correct answer represents a part of the solution. Choose all that apply.
Answer options
- A. Under Macro Settings in the Macro Settings category, click Enable all macros, and then click OK.
- B. Switch to Excel and save the workbook with the .xslm extension as a macro-enabled workbook and close it.
- C. Reopen the workbook.
- D. Click OK in the message box.
Correct answer: B, C, D
Explanation
The correct steps include saving the workbook as a macro-enabled file (.xslm) to ensure that the macro can run, reopening the workbook to trigger the open event, and acknowledging the message box to confirm the macro works. Option A is incorrect because it refers to enabling macros, which is not required for this specific task at this stage.