Online Exam Quiz

questionQuestion  1 to 30

What is the default access level for a module in VBA?

  • Public
  • Private
  • Protected
  • Static
Mark for review

Which object is used to interact with the user in VBA?

  • UserObject
  • FormObject
  • DialogBox
  • UserForm
Mark for review

How do you reference a cell in VBA?

  • Cells(Row, Column)
  • R1C1
  • Range(Address)
  • SheetName!CellAddress
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

What is the purpose of the Do...Loop structure in VBA?

  • To create an iterative loop
  • To define a function
  • To manage events
  • To handle errors
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 define a procedure that does not return a value in VBA?

  • Sub ProcedureName()
  • Function ProcedureName()
  • Public ProcedureName()
  • Private ProcedureName()
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

Which function returns the current date in VBA?

  • Date
  • Now
  • Today
  • CurrentDate
Mark for review

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

  • ConvertToDate()
  • DateFromString()
  • DateValue()
  • StringToDate()
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

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

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 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

Which event occurs when a workbook is opened in Excel?

  • Workbook_Open
  • Workbook_Start
  • Workbook_Load
  • Workbook_Begin
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 method is used to close a workbook in VBA?

  • Close()
  • CloseWorkbook()
  • SaveAndClose()
  • Quit()
Mark for review

What does ActiveWorkbook refer to in VBA?

  • The workbook that is currently active
  • The first workbook in the list
  • The workbook with the most recent changes
  • The workbook with the highest value
Mark for review

Which statement is used to declare a variable in VBA?

  • var
  • dim
  • declare
  • variable
Mark for review

How do you start a macro in VBA?

  • Sub MacroName()
  • Start MacroName
  • Macro MacroName
  • Begin MacroName
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 does VBA provide that allows developers to automate repetitive tasks in Excel?

  • Functions
  • Macros
  • Formulas
  • Queries
Mark for review

How do you refer to the active worksheet in VBA?

  • ActiveSheet()
  • CurrentSheet()
  • ThisSheet()
  • Worksheet()
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

Which statement is used to exit a loop in VBA?

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

Which method is used to save a workbook in VBA?

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

Which function is used to execute a VBA macro in Excel?

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

How do you find the last used row in a column using VBA?

  • Range("A" & Rows.Count).End(xlUp).Row
  • Cells(Rows.Count, 1).End(xlUp).Row
  • Range("A1").End(xlDown).Row
  • Cells(1, Columns.Count).End(xlLeft).Row
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

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