โ† All Excel VBA Flashcard Decks

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
  1. Which VBA class provides access to the Windows Registry for reading and writing keys?

    Answer: WScript.Shell via RegRead/RegWrite

    The WScript.Shell object exposes RegRead, RegWrite, and RegDelete methods for interacting with the Windows Registry from VBA.

  2. In VBA, what keyword prevents a variable declared in a standard module from being accessed by other modules?

    Answer: Private

    Private restricts the variable's scope to the module in which it is declared, hiding it from all other modules.

  3. Which Excel object model property returns a Range representing all cells currently visible after applying filters?

    Answer: Range.SpecialCells(xlCellTypeVisible)

    SpecialCells(xlCellTypeVisible) returns only the cells that are not hidden by row/column hiding or AutoFilter, enabling operations on filtered data.

  4. When using ADO in VBA to query an Excel workbook as a database, which connection string provider is used?

    Answer: Microsoft.ACE.OLEDB.12.0

    The ACE OLEDB 12.0 provider supports .xlsx files; the older Jet 4.0 provider only supports .xls files.

  5. What VBA property of a Chart object allows you to programmatically change its chart type?

    Answer: Chart.ChartType

    The ChartType property accepts an XlChartType enum constant (e.g., xlLine, xlBar) to change the chart's visualization type.

  6. Which VBA function returns the number of bytes used by a variable or data type?

    Answer: LenB

    LenB returns the length in bytes rather than characters, making it useful for memory size calculations with Unicode strings.

  7. In Excel VBA, which method of the Workbook object saves a copy of the file to a new path without changing the active workbook's path?

    Answer: SaveCopyAs

    SaveCopyAs saves a duplicate of the workbook to the specified filename while keeping the original workbook open and unchanged.