Online Exam Quiz

questionQuestion  1 to 30

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

How do you declare a dynamic array in VBA?

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

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

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

Which object represents the Excel application in VBA?

  • App
  • Workbook
  • Worksheet
  • Application
Mark for review

How do you loop through each worksheet in a workbook using VBA?

  • For Each ws In Worksheets
  • For ws = Worksheets
  • For ws In Sheets
  • For Each ws In Sheets
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 default access level for a module in VBA?

  • Public
  • Private
  • Protected
  • Static
Mark for review

How do you access the value of a cell using VBA?

  • cell.value
  • cell.text
  • cell.data
  • cell.contents
Mark for review

What is the purpose of the "ByRef" keyword in VBA?

  • Pass arguments by reference
  • Pass arguments by value
  • Declare a variable
  • Declare a constant
Mark for review

Which statement is used to declare a variable in VBA?

  • var
  • dim
  • declare
  • variable
Mark for review

Which statement is used to start a comment in VBA?

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

Which method is used to save a workbook in VBA?

  • Workbook.Save
  • SaveWorkbook
  • SaveAs
  • Workbook.SaveAs
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 concatenate two strings in VBA?

  • String1 & String2
  • String1 + String2
  • Join(String1, String2)
  • Merge(String1, String2)
Mark for review

What does the "DoEvents" function do in VBA?

  • Pause execution and wait for user input
  • Allow other events to be processed
  • Stop execution of the current subroutine
  • Display an error message
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 function is used to execute a VBA macro in Excel?

  • RunMacro()
  • ExecuteMacro()
  • ExecuteMacro()
  • Macro()
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

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

How do you make a macro run automatically when the workbook is opened?

  • Use Workbook_Open event
  • Use Worksheet_Change event
  • Use Workbook_BeforeClose event
  • Use Workbook_AfterSave event
Mark for review

How do you check if a worksheet exists in VBA?

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

Which property is used to specify the name of a worksheet in VBA?

  • Name
  • SheetName
  • Title
  • WorksheetName
Mark for review

Which method is used to save a workbook in VBA?

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

How do you reference a cell in VBA?

  • Cells(Row, Column)
  • R1C1
  • Range(Address)
  • SheetName!CellAddress
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 clear the contents of a cell in VBA?

  • ClearCell()
  • DeleteCell()
  • ClearContents()
  • RemoveCell()
Mark for review

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

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

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

  • InputBox
  • MsgBox
  • PromptBox
  • TextBox
Mark for review

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

  • Uppercase()
  • ToUpper()
  • Upper()
  • StrConv()
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