Technology & Digital Applications 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 Technology & Digital Applications flashcards as text
Which VBA function pauses code execution for a specified number of seconds?
Answer: Application.Wait Now + TimeValue("00:00:05")
Application.Wait accepts a time value and pauses VBA execution until that time is reached, commonly used with Now + TimeValue for a delay.
What is the correct way to reference a named range called 'SalesData' in a VBA formula assigned to a cell?
Answer: Range("A1").Formula = "=SUM(SalesData)"
Named ranges can be referenced directly by name inside formula strings assigned to the Formula property, just as they are in worksheet formulas.
When declaring a dynamic array in VBA, which statement resizes it while preserving existing data?
Answer: ReDim Preserve arr(newSize)
ReDim Preserve changes the array's upper bound while keeping existing element values; ReDim alone would erase all data.
Which VBA property determines whether formula calculation in Excel is automatic or manual?
Answer: Application.Calculation
Application.Calculation can be set to xlCalculationAutomatic or xlCalculationManual to control when Excel recalculates formulas.
In VBA, which built-in constant represents a carriage return and line feed combination when building multi-line strings?
Answer: vbCrLf
vbCrLf is the VBA constant equal to Chr(13) & Chr(10), representing Windows-style line endings used in strings and message boxes.
Which approach correctly prevents an Excel Add-in macro from appearing in the user-facing Macro dialog box?
Answer: Declare the Sub as Private
Private procedures are not listed in the Macro dialog, effectively hiding internal helper routines from end users.
What VBA method on the Range object fills a selection with a series of values based on a pattern, equivalent to Excel's Fill Series feature?
Answer: Range.DataSeries
The DataSeries method fills a range with a linear, growth, or date series, mirroring the Home > Fill > Series dialog functionality.