Excel VBA Cheat Sheet 2026

The 30 highest-yield Excel VBA facts, distilled from real exam questions. Print it, save it as a PDF, or study it here — free, no sign-up.

50 questions
60 min time limit
55.00% to pass
  1. In VBA, which method adds a new worksheet to a workbook? Worksheets.Add()
  2. What does 'On Error Resume Next' do in VBA? Allows execution to continue with the statement following the error
  3. What does the 'ByVal' keyword mean in a VBA procedure parameter? A copy of the argument is passed; changes don't affect the original
  4. How do Excel VBA professionals evaluate research quality? By assessing methodology, sample size, peer review status, and relevance to practice
  5. Which error handling approach is most appropriate for production VBA code that needs to respond differently to multiple error types? Use a GoTo handler with a Select Case block on Err.Number
  6. How has digital technology transformed Excel VBA practice? It has enhanced data collection, analysis, communication, and operational efficiency
  7. What is the VBA constant for a newline character in a message box? vbCrLf
  8. Which of the following is the default data passing method in VBA? ByRef
  9. To share a VBA analysis tool with colleagues who should not modify the code, which protection method should be applied? VBA Project password via Tools > VBAProject Properties
  10. A QA sub must verify that all numeric cells in a report column are formatted as currency. Which property should it inspect? cell.NumberFormat
  11. A developer hard-codes a file path like 'C:\Users\John\data.xlsx' in a macro. What professional concern does this raise? It breaks portability — the macro fails on any other machine or user profile
  12. What does the Range.AutoFilter method do in VBA? Applies or removes dropdown filter controls on a range
  13. Which VBA debugging feature lets you monitor a specific variable or expression and optionally pause execution when its value changes? Watch Expressions
  14. What is the default lower bound for VBA arrays? 0
  15. Which keyword exits a Sub procedure immediately in VBA? Exit Sub
  16. A researcher's VBA macro must skip blank rows in a dataset. Which condition correctly identifies a blank cell in column A at row i? Cells(i,1).Value = ""
  17. When a VBA developer uses 'With...End With' blocks, which professional benefit is achieved? It reduces repetitive object references, improving both readability and execution speed
  18. A VBA macro will be used by non-technical staff. Which professional design decision improves the user experience most? Adding a custom ribbon button or form with clear labels and input validation
  19. What is the purpose of the 'Option Explicit' statement at the top of a VBA module? Forces all variables to be declared before use
  20. What is the first step in risk assessment for Excel VBA professionals? Identifying potential hazards and vulnerabilities in the specific context
  21. Which of the following formulas will produce an integer between 1 and 10, inclusive, with a probability of 10% for each integer? INT(10*RAND())+1
  22. A researcher wants a VBA function to return multiple computed statistics. What is the correct approach in VBA? Both A and B are valid
  23. How should an Excel VBA professional respond to a compliance violation? Report it promptly, investigate the root cause, and implement corrective actions
  24. Which VBA data type stores True or False values? Boolean
  25. How does a Excel VBA professional communicate risks to stakeholders? By presenting risks clearly with context, potential impacts, and recommended actions
  26. Which VBA statement writes a QA error message to the Immediate Window without halting execution? Debug.Print 'Error: ' & msg
  27. How do you copy a range in VBA without including the clipboard (direct value copy)? destRange.Value = sourceRange.Value
  28. Which approach correctly prevents an Excel Add-in macro from appearing in the user-facing Macro dialog box? Declare the Sub as Private
  29. Which VBA statement correctly reads all values from a worksheet range into an array for batch processing? Dim arr() As Variant: arr = Range("A1:A100").Value
  30. Which tool is commonly used for root cause analysis in Excel VBA quality management? Fishbone (Ishikawa) diagram to identify contributing factors systematically
Was this helpful?