Online Exam Quiz

questionQuestion  1 to 30

How do you refer to the active worksheet in VBA?

  • ActiveSheet()
  • CurrentSheet()
  • ThisSheet()
  • Worksheet()
Mark for review

What is the purpose of the "IsNumeric" function in VBA?

  • Check if a variable is numeric
  • Convert a string to a number
  • Round a number to the nearest integer
  • Check if a string is numeric
Mark for review

How do you reference a cell in a different worksheet in VBA?

  • Worksheets("Sheet2").Range("A1")
  • Sheets("Sheet2").Cells(1, 1)
  • Worksheet("Sheet2").Range("A1")
  • Sheets("Sheet2").Range("A1")
Mark for review

How do you declare a dynamic array in VBA?

  • dim arr()
  • array arr()
  • arr = array()
  • dynamic arr()
Mark for review

Which function is used to find the position of a substring within a string in VBA?

  • Find()
  • Search()
  • Locate()
  • Position()
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 refer to the second sheet in a workbook using VBA?

  • Sheets(2)
  • Worksheets(2)
  • Sheet(2)
  • Workbook.Sheets(2)
Mark for review

How do you check if a worksheet exists in VBA?

  • WorksheetExists()
  • SheetExists()
  • CheckWorksheet()
  • DoesSheetExist()
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

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 convert a number to a string in VBA?

  • ToString()
  • ConvertToString()
  • Str()
  • String()
Mark for review

What does ActiveCell refer to in VBA?

  • The currently selected cell
  • The first cell in the worksheet
  • The last cell in the worksheet
  • The cell with the highest value
Mark for review

What does the Offset method do in VBA?

  • Moves the reference to a different cell
  • Adds a new cell
  • Changes the size of a cell
  • Deletes a cell
Mark for review

Which statement is used to declare a variable in VBA?

  • var
  • dim
  • declare
  • variable
Mark for review

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

  • RunMacro()
  • ExecuteMacro()
  • CallMacro()
  • Assign macro to button
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 method is used to save a workbook in VBA?

  • Workbook.Save
  • SaveWorkbook
  • SaveAs
  • Workbook.SaveAs
Mark for review

What is the purpose of the "Application.ScreenUpdating" property in VBA?

  • Control screen updates while executing macros
  • Hide the Excel application window
  • Enable automatic screen updates
  • Disable screen updates
Mark for review

How do you insert a new module in the VBA editor?

  • Insert > Module
  • File > New Module
  • Home > New Module
  • Developer > New Module
Mark for review

Which VBA keyword is used to create a new class module?

  • Class
  • Module
  • Object
  • Structure
Mark for review

How do you set the font size of a cell to 12 in VBA?

  • Range("A1").Font.Size = 12
  • Range("A1").Font.Size = 12
  • Range("A1").Font.Size = "12"
  • Range("A1").Font.Size = "12"
Mark for review

How do you set the value of a named range in VBA?

  • Range("NamedRange").Value = Value
  • Worksheets("Sheet1").Range("NamedRange").Value = Value
  • Application.Names("NamedRange").Value = Value
  • NamedRange.Value = Value
Mark for review

What is the file extension for Excel macro-enabled workbooks?

  • .xlsx
  • .xlsm
  • .xls
  • .vba
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 is the use of Dim statement in VBA?

  • To declare variables
  • To define functions
  • To initialize constants
  • To create arrays
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 is used to display a message box in VBA?

  • MsgBox()
  • Alert()
  • ShowMessage()
  • DisplayAlert()
Mark for review

Which statement is used to loop through a range of cells in VBA?

  • for loop
  • while loop
  • do-while loop
  • for each loop
Mark for review

What keyword is used to declare a variable in VBA?

  • Dim
  • Var
  • Let
  • Const
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

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