← All Excel VBA Flashcard Decks

Excel VBA Fundamentals & Syntax Flashcards

6 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 6 Excel VBA Fundamentals & Syntax flashcards as text
  1. What is the VBA constant for a newline character in a message box?

    Answer: vbCrLf

    vbCrLf inserts a carriage return and line feed to create a new line in strings and message boxes.

  2. How do you write a comment in VBA code?

    Answer: ' comment

    In VBA, a single apostrophe (') at the start of a line or inline makes the rest of the text a comment.

  3. What value does an uninitialized numeric variable hold in VBA?

    Answer: 0

    Uninitialized numeric variables in VBA default to 0 automatically.

  4. Which VBA function converts a string to uppercase?

    Answer: UCase()

    UCase() is the VBA built-in function that converts all characters in a string to uppercase.

  5. What is the result of the VBA expression: 7 Mod 3?

    Answer: 1

    The Mod operator returns the remainder of integer division, so 7 divided by 3 leaves a remainder of 1.

  6. In VBA, which scope modifier makes a variable visible throughout the entire module?

    Answer: Private

    A variable declared with Private at module level is accessible to all procedures within that module only.