โ† All Excel VBA Flashcard Decks

Risk Assessment & Management Flashcards

7 cards from real Excel VBA practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Risk Assessment & Management flashcards as text
  1. In Excel VBA risk modeling, which method best prevents a Monte Carlo simulation from producing identical results on every run?

    Answer: Call Randomize before Rnd()

    Calling Randomize (optionally with Timer) seeds the random number generator so each run produces a unique sequence.

  2. A VBA risk dashboard must highlight cells where a calculated probability exceeds a threshold stored in a named range called 'RiskLimit'. Which approach is most maintainable?

    Answer: Reference the named range directly in the macro comparison

    Referencing the named range directly keeps the threshold in one managed location that business users can update without touching VBA code.

  3. Which VBA statement correctly catches a division-by-zero error that may occur when calculating a risk ratio?

    Answer: On Error GoTo ErrHandler

    On Error GoTo ErrHandler redirects execution to a labeled error handler where division-by-zero (Err.Number 11) can be addressed.

  4. When building a risk scoring matrix in VBA, a nested Select Case structure is preferred over nested If/ElseIf because it:

    Answer: Improves readability for multiple discrete score bands

    Select Case clearly maps discrete score ranges to outcomes, making the risk banding logic easier to read and audit than deeply nested If/ElseIf.

  5. A risk analyst wants to log every VBA-calculated risk score to a new row in a 'RiskLog' sheet automatically. Which technique avoids overwriting existing entries?

    Answer: Use Sheets("RiskLog").Cells(Rows.Count,1).End(xlUp).Offset(1,0)

    Finding the last used row and offsetting by one appends entries without disturbing existing log data.

  6. In a VBA-based risk tool, ScreenUpdating is set to False before a long calculation loop. What is the primary risk of forgetting to reset it to True?

    Answer: The Excel UI freezes and appears unresponsive to the user after the macro ends

    Leaving ScreenUpdating as False after the macro finishes makes Excel appear frozen because screen redraws are suppressed.

  7. A risk register macro uses a Public variable to track cumulative exposure across multiple subroutines. What is the key risk of this design?

    Answer: Any module can accidentally modify the variable, introducing hard-to-trace bugs

    Public module-level variables are writable by any code in the project, making unintended side effects difficult to diagnose.