Online Exam Quiz

questionQuestion  1 to 30

How do you execute a VBA macro from a button click in Excel?

  • RunMacro()
  • ExecuteMacro()
  • CallMacro()
  • Assign macro to button
Mark for review

How can you add a new worksheet to an Excel workbook using VBA?

  • Worksheets.Add
  • Sheets.New
  • AddSheet
  • Workbook.Sheets.Add
Mark for review

Which object is used to manipulate the Excel workbook?

  • Workbook
  • Workbooks
  • Sheet
  • Worksheet
Mark for review

What is the purpose of the "With" statement in VBA?

  • Specify conditional statements
  • Group multiple statements
  • Access properties of an object
  • Define variables
Mark for review

What is the purpose of the Cells property in VBA?

  • Access specific cells in a range
  • Define cell formatting
  • Modify cell formulas
  • Count the number of cells in a range
Mark for review

How do you check if a file exists in VBA?

  • FileExists()
  • CheckFile()
  • FileExist()
  • DoesFileExist()
Mark for review

How do you check if a worksheet exists in VBA?

  • WorksheetExists()
  • SheetExists()
  • CheckWorksheet()
  • DoesSheetExist()
Mark for review

What does the keyword "Option Explicit" do in VBA?

  • Enables case sensitivity
  • Forces declaration of all variables
  • Disables debugging
  • Hides errors
Mark for review

How do you reference a cell in VBA?

  • Cells(Row, Column)
  • R1C1
  • Range(Address)
  • SheetName!CellAddress
Mark for review

Which method is used to open a workbook in VBA?

  • Open()
  • OpenWorkbook()
  • LoadWorkbook()
  • Workbooks.Open()
Mark for review

How can you delete a row in VBA?

  • Rows(RowNumber).Delete
  • Range("RowNumber").Delete
  • Worksheet.Rows(RowNumber).Clear
  • Sheets("Sheet1").Rows(RowNumber).Delete
Mark for review

Which function is used to display an input box in VBA?

  • InputBox
  • MsgBox
  • PromptBox
  • TextBox
Mark for review

How do you declare an array in VBA?

  • Dim ArrayName(1 To 10) As DataType
  • Dim ArrayName As DataType
  • Dim ArrayName()
  • Dim ArrayName(10) As DataType
Mark for review

Which method is used to insert a column in a worksheet in VBA?

  • InsertColumn()
  • AddColumn()
  • Insert()
  • Columns.Insert()
Mark for review

What does the For Each loop iterate through?

  • Elements of a collection
  • Numbers in a range
  • Characters in a string
  • Worksheets in a workbook
Mark for review

How do you declare a constant in VBA?

  • Const VariableName As DataType = Value
  • Dim VariableName As DataType = Value
  • Let VariableName As DataType = Value
  • Define VariableName As DataType = Value
Mark for review

How do you enable macros in Excel using VBA?

  • Application.EnableEvents = True
  • Application.MacroOptions.Enable = True
  • Application.AutomationSecurity = msoAutomationSecurityLow
  • Application.MacroSettings.Enable = True
Mark for review

How do you concatenate strings in VBA?

  • concat()
  • join()
  • &
  • concatString()
Mark for review

What is the purpose of DoEvents in VBA?

  • Allows other operations to run
  • Ends a loop
  • Pauses execution
  • Ends the macro
Mark for review

How do you make a cell's value read-only using VBA?

  • Range("A1").Locked = True
  • Range("A1").Protect = True
  • Range("A1").Value = "ReadOnly"
  • Range("A1").Formula = "ReadOnly"
Mark for review

Which method is used to insert a row in a worksheet in VBA?

  • InsertRow()
  • AddRow()
  • Insert()
  • Rows.Insert()
Mark for review

Which function returns the current date in VBA?

  • Date
  • Now
  • Today
  • CurrentDate
Mark for review

Which method is used to save a workbook in VBA?

  • Save()
  • SaveAs()
  • SaveWorkbook()
  • Export()
Mark for review

How do you make a cell value bold using VBA?

  • Range("A1").Font.Bold = True
  • Range("A1").Bold = True
  • Range("A1").Font.Bold = "True"
  • Range("A1").Font.Bold = "1"
Mark for review

What does Range("A1:B10").Select do?

  • Selects cells from A1 to B10
  • Selects only cell A1
  • Selects cells from A1 to B10, including B10
  • Selects column A and row 1
Mark for review

Which function is used to convert a string to uppercase in VBA?

  • Uppercase()
  • ToUpper()
  • Upper()
  • StrConv()
Mark for review

How do you declare a constant in VBA?

  • constant
  • declare constant
  • const
  • define constant
Mark for review

What is the purpose of the Range object in VBA?

  • Access Excel formulas
  • Manipulate cell formatting
  • Work with ranges of cells
  • Create new worksheets
Mark for review

Which statement is used to exit a loop in VBA?

  • end loop
  • exit loop
  • break
  • exit for
Mark for review

Which function is used to find the length of a string in VBA?

  • Length
  • Len
  • Size
  • LengthOf
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review