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
Which Excel VBA function returns the standard deviation of a range of simulated risk outcomes stored in an array?
Answer: WorksheetFunction.StDev(arr)
WorksheetFunction.StDev exposes Excel's STDEV function to VBA, making it straightforward to compute sample standard deviation on an array or range.
A macro generates a risk heat map by coloring cells. After running, colleagues report the colors persist even after underlying data changes. The best fix is to:
Answer: Use conditional formatting rules instead of VBA color assignments
Conditional formatting updates automatically when cell values change, whereas VBA-applied colors are static until the macro re-runs.
To protect sensitive risk model formulas from accidental editing while still allowing VBA to write results, you should:
Answer: Protect the sheet and pass the password in VBA using Protect/Unprotect
Calling ActiveSheet.Unprotect with the password before writing, then re-protecting afterward, lets VBA update output cells while blocking manual edits.
Which data type is most appropriate in VBA for storing a probability value such as 0.0235 in a risk calculation?
Answer: Double
Double provides 64-bit floating-point precision, necessary for accurate probability arithmetic where rounding errors could compound across many calculations.
A VBA macro that performs scenario analysis must pause and display interim results to the user before continuing. The best approach is to use:
Answer: MsgBox to show results and wait for user confirmation
MsgBox halts macro execution and presents results, resuming only after the user dismisses it, making it ideal for interactive scenario review.
When importing external risk data via VBA using ADODB, which step is critical before releasing the connection to prevent memory leaks?
Answer: Set rs = Nothing and conn.Close
Closing the recordset and connection, then setting both to Nothing, releases COM object references and prevents memory leaks.
A risk tolerance threshold is stored in a VBA Const at the top of a module. A compliance requirement changes the threshold. What is the main disadvantage of using Const for this value?
Answer: Changing the threshold requires editing and re-deploying VBA code
A Const is compiled into the code, so any change requires a developer to modify source, whereas a named cell or configuration sheet allows business-user updates without code changes.