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 method is used to send an HTTP GET request using the MSXML2.XMLHTTP object?
Answer: Open
The Open method initializes a request on MSXML2.XMLHTTP, specifying the method (GET/POST) and URL before calling Send.
When automating a web browser with VBA using Internet Explorer automation, which library reference must be enabled?
Answer: Microsoft Internet Controls
Microsoft Internet Controls (shdocvw.dll) provides the InternetExplorer object used for IE automation in VBA.
In VBA, which function converts a JSON-like string value retrieved from a web API into a usable number?
Answer: CDbl
CDbl converts a string representation of a number to a Double data type, suitable for numeric calculations after parsing API responses.
What VBA statement is used to create a new instance of a late-bound COM object without a reference set?
Answer: CreateObject("ProgID")
CreateObject creates a new instance of a COM object using its ProgID string, enabling late binding without requiring a library reference.
Which Excel VBA object model class allows you to interact with Power Query (Get & Transform) connections programmatically?
Answer: WorkbookQuery
The WorkbookQuery object (accessed via Workbook.Queries collection) represents a Power Query query defined in the workbook.
What is the correct VBA syntax to add a new worksheet and position it after the last existing sheet?
Answer: Sheets.Add After:=Sheets(Sheets.Count)
Sheets.Add with the After parameter set to Sheets(Sheets.Count) inserts the new sheet after the last sheet in the workbook.
When using VBA to write data to a CSV file, which statement opens a file in output mode and assigns it a file number?
Answer: Open filePath For Output As #1
The VBA Open statement with 'For Output As #n' opens a file for sequential writing, assigning it the specified file number for subsequent Print or Write statements.