VBA Mock Test

Note:- Read each question carefully and select the most appropriate answer. Complete the test within the allotted time and review your answers before submission. Once submitted, your score and correct answers will be displayed.

1. Which keyword is commonly used to declare a variable in VBA?

 
 
 
 

2. Which statement starts a For loop in VBA?

 
 
 
 

3. Which keyword assigns an object reference to an object variable?

 
 
 
 

4. Which object represents an Excel file/workbook?

 
 
 
 

5. Which data type stores text in VBA?

 
 
 
 

6. Which keyword begins a VBA function?

 
 
 
 

7. Which statement is used to choose among multiple possible values or cases?

 
 
 
 

8. Where can you usually open the VBA Editor in Excel?

 
 
 
 

9. Which VBA procedure runs a block of code and does not return a value directly?

 
 
 
 

10. What does Option Explicit require in a VBA module?

 
 
 
 

11. Which property returns the value stored in a cell?

 
 
 
 

12. Which structure is used to make a decision based on a condition?

 
 
 
 

13. What does VBA stand for?

 
 
 
 

14. Which method saves the active workbook?

 
 
 
 

15. Which VBA function asks the user to enter a value in a dialog box?

 
 
 
 

16. Which object represents an Excel worksheet?

 
 
 
 

17. Which statement is commonly used to handle runtime errors by directing execution to an error handler?

 
 
 
 

18. Which command can run a VBA macro from Excel’s Macro dialog?

 
 
 
 

19. Which data type is suitable for storing whole numbers within the Integer range?

 
 
 
 

20. Which expression refers to cell A1 on the active worksheet?

 
 
 
 

21. Which event procedure runs when a user changes a worksheet cell?

 
 
 
 

22. Which loop repeats while a condition remains True?

 
 
 
 

23. Which VBA loop is commonly used to process every item in a collection, such as each worksheet?

 
 
 
 

24. What is the keyboard shortcut to open the VBA Editor in Excel on Windows?

 
 
 
 

25. Which VBA statement displays a message box?

 
 
 
 

Question 1 of 25