Recall & Review
beginner
What is a VBA procedure in Excel?
A VBA procedure is a set of instructions written in Visual Basic for Applications that performs a specific task in Excel, like automating actions or calculations.
Click to reveal answer
beginner
How do you start writing a simple VBA procedure?
Open the VBA editor by pressing Alt + F11, insert a new module, and write a Sub procedure starting with
Sub ProcedureName() and ending with End Sub.Click to reveal answer
beginner
What does the following VBA code do?<br>
Sub HelloWorld() MsgBox "Hello, world!" End Sub
This procedure shows a message box with the text "Hello, world!" when run.
Click to reveal answer
beginner
How do you run a VBA procedure in Excel?
You can run a VBA procedure by pressing F5 in the VBA editor or by assigning the procedure to a button or shortcut in Excel.
Click to reveal answer
intermediate
What is the difference between a Sub and a Function in VBA?
A Sub performs actions but does not return a value. A Function performs actions and returns a value that can be used in Excel formulas.
Click to reveal answer
Which keyword starts a VBA procedure that does not return a value?
✗ Incorrect
A VBA procedure that does not return a value starts with the keyword Sub.
What does the MsgBox function do in VBA?
✗ Incorrect
MsgBox shows a popup message box with text or buttons.
How do you open the VBA editor in Excel?
✗ Incorrect
Alt + F11 opens the VBA editor window.
Which statement correctly ends a VBA Sub procedure?
✗ Incorrect
Every Sub procedure must end with End Sub.
What is the main purpose of a VBA procedure?
✗ Incorrect
VBA procedures automate repetitive or complex tasks.
Explain how to create and run a simple VBA procedure that shows a message box.
Think about the steps from opening the editor to seeing the message.
You got /4 concepts.
Describe the difference between a Sub and a Function in VBA.
Focus on what each procedure type can give back after running.
You got /4 concepts.