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 property of the Application object returns the version number of Excel currently running?
Answer: Application.Version
Application.Version returns a string like "16.0" representing the Excel version, useful for writing version-conditional code.
In VBA, what does the Shell function return when it successfully launches an external application?
Answer: The process ID of the launched application
Shell returns the process ID (a Double) of the program it started, or zero if the call failed.
Which event fires when a workbook is opened and is the correct place to initialize application-level settings in VBA?
Answer: Workbook_Open
Workbook_Open is the standard event procedure in ThisWorkbook that runs automatically when the file is opened.
What VBA technique allows you to respond to events raised by objects not natively supported by the class module?
Answer: WithEvents keyword in a class module
Declaring an object variable with WithEvents in a class module allows VBA to sink and respond to that object's events.
When automating Outlook from Excel VBA, which object is the correct entry point to the Outlook object model?
Answer: Outlook.Application
Outlook.Application is the top-level object that provides access to all other Outlook objects such as NameSpace, Folders, and MailItem.
Which VBA FileSystemObject method creates all intermediate directories needed for a given path?
Answer: CreateFolder
FSO.CreateFolder creates a single folder; if intermediate folders are missing you must create them recursively, as there is no built-in MkDirAll equivalent.
What is the purpose of the VBA statement 'DoEvents' when used inside a long-running loop?
Answer: It yields control to the operating system so the UI remains responsive
DoEvents yields execution so Windows can process pending messages, keeping the Excel UI responsive during long loops.