0
0
Excelspreadsheet~10 mins

VBA editor basics in Excel - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to open the VBA editor using a keyboard shortcut.

Excel
Press [1] + F11 to open the VBA editor in Excel.
Drag options to blanks, or click blank then click option'
AAlt
BCtrl
CShift
DWindows
Attempts:
3 left
💡 Hint
Common Mistakes
Using Ctrl instead of Alt
Using Shift instead of Alt
Using Windows key instead of Alt
2fill in blank
medium

Complete the code to insert a new module in the VBA editor.

Excel
In the VBA editor, click on the [1] menu, then select 'Module'.
Drag options to blanks, or click blank then click option'
AView
BInsert
CFile
DTools
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing File menu instead of Insert
Choosing Tools menu instead of Insert
Choosing View menu instead of Insert
3fill in blank
hard

Fix the error in the code to run a macro from the VBA editor.

Excel
To run a macro, press [1] or click the Run button.
Drag options to blanks, or click blank then click option'
AShift
BCtrl
CAlt
DF5
Attempts:
3 left
💡 Hint
Common Mistakes
Pressing Ctrl + R instead of F5
Pressing Alt + R instead of F5
Pressing Shift + R instead of F5
4fill in blank
hard

Fill both blanks to declare a variable in VBA with the correct type.

Excel
Dim [1] As [2]
Drag options to blanks, or click blank then click option'
AmyNumber
BInteger
CString
DSet
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'Set' as a variable name
Using 'Set' as a type
Mixing variable name and type
5fill in blank
hard

Fill the blanks to write a simple VBA subroutine that shows a message box.

Excel
Sub [1]()
    [2] "Hello, world!"
End Sub
Drag options to blanks, or click blank then click option'
AShowMessage
BMsgBox
CPrint
DDisplay
Attempts:
3 left
💡 Hint
Common Mistakes
Using Print instead of MsgBox
Using Display instead of MsgBox
Not naming the subroutine