Research & Evidence-Based Practice 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 Research & Evidence-Based Practice flashcards as text
A researcher wants to log each macro run with a timestamp for audit trails. Which VBA function returns the current date and time?
Answer: Now()
Now() returns a Date value combining both the current date and time, suitable for timestamping audit log entries.
To protect research data integrity, a VBA macro should write results to a new sheet rather than overwrite source data. Which code adds a new worksheet?
Answer: Sheets.Add
Sheets.Add inserts a new worksheet into the active workbook, preserving source data on the original sheet.
Which VBA error handling structure should wrap data analysis code to catch runtime errors without crashing the macro?
Answer: On Error GoTo ErrorHandler
On Error GoTo ErrorHandler redirects execution to a labeled error-handling block when a runtime error occurs.
When exporting research results to a new workbook for distribution, which VBA method saves it without displaying a dialog?
Answer: Workbook.SaveAs filename, FileFormat:=xlOpenXMLWorkbook
Workbook.SaveAs with a filename and FileFormat argument saves programmatically without prompting the user.
A researcher's VBA macro must skip blank rows in a dataset. Which condition correctly identifies a blank cell in column A at row i?
Answer: Cells(i,1).Value = ""
Comparing a cell's Value to an empty string "" correctly identifies cells that contain no data.
To analyze research survey data across multiple worksheets with identical structure, which VBA technique efficiently loops through all sheets?
Answer: For Each ws In ThisWorkbook.Worksheets
For Each ws In ThisWorkbook.Worksheets iterates every worksheet regardless of how many exist in the workbook.
Which built-in VBA constant represents the last used cell in a column when finding the end of a research dataset?
Answer: xlDown
Cells(Rows.Count,1).End(xlUp) uses the xlUp direction constant to navigate from the bottom to the last filled cell.