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

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

  • InsertRow()
  • AddRow()
  • Insert()
  • Rows.Insert()
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 can you create a new workbook using VBA?

  • Workbooks.Add
  • New Workbook
  • CreateWorkbook
  • AddWorkbook
Mark for review

What does VBA stand for?

  • Visual Basic Analysis
  • Visual Basic Analysis
  • Visual Basic for Applications
  • Visual Basic for Applications
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

What is the purpose of the End statement in VBA?

  • To end a loop or procedure
  • To end a function
  • To end a workbook
  • To end a variable
Mark for review

What keyword is used to declare a variable in VBA?

  • Dim
  • Var
  • Let
  • Const
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 global variable in VBA?

  • Global
  • DeclareGlobal
  • Public
  • GlobalVar
Mark for review

How do you start a macro in VBA?

  • Sub MacroName()
  • Start MacroName
  • Macro MacroName
  • Begin MacroName
Mark for review

What is the default value of a Boolean variable in VBA?

  • TRUE
  • FALSE
  • Null
  • Empty
Mark for review

Which method is used to hide a worksheet in VBA?

  • Worksheet.Hide
  • Sheets(1).Visible = xlSheetHidden
  • Worksheet.Visible = xlSheetVeryHidden
  • Sheets(1).Hide
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

How do you add a border to a cell in VBA?

  • Range("A1").Borders.LineStyle = xlContinuous
  • Range("A1").Border = xlContinuous
  • Range("A1").Borders.Style = xlContinuous
  • Range("A1").Borders.Add
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

How do you convert a number to a string in VBA?

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

What does the term "Object-Oriented Programming" mean in the context of VBA?

  • Programming with objects and classes
  • Programming with loops and conditions
  • Programming with arrays and variables
  • Programming with macros and functions
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 keyword is used to exit a loop in VBA?

  • Break
  • Exit
  • End
  • Stop
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 does VBA provide that allows developers to automate repetitive tasks in Excel?

  • Functions
  • Macros
  • Formulas
  • Queries
Mark for review

How do you reference a cell in VBA?

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

Which statement is used to start a comment in VBA?

  • //
  • /*
  • '
  • #
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

How do you clear the contents of a cell in VBA?

  • ClearCell()
  • DeleteCell()
  • ClearContents()
  • RemoveCell()
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 check if a file exists in VBA?

  • FileExists()
  • CheckFile()
  • FileExist()
  • DoesFileExist()
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 property is used to specify the name of a worksheet in VBA?

  • Name
  • SheetName
  • Title
  • WorksheetName
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