Online Exam Quiz

questionQuestion  1 to 30

How do you declare a constant in VBA?

  • constant
  • declare constant
  • const
  • define constant
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 Application.Volatile statement do?

  • Makes a function volatile
  • Makes a cell's value volatile
  • Makes a macro volatile
  • Makes the workbook volatile
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

Which event is triggered when a workbook is opened in VBA?

  • Workbook_Open
  • Workbook_Load
  • Workbook_AfterOpen
  • Workbook_BeforeOpen
Mark for review

What does Application.CutCopyMode = False do?

  • Clears the clipboard
  • Disables cut and copy
  • Resets the application
  • Clears the selected range
Mark for review

Which object represents the Excel application in VBA?

  • App
  • Workbook
  • Worksheet
  • Application
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

How can you create a new workbook using VBA?

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

Which property is used to access the cells in a worksheet using VBA?

  • Cells
  • Range
  • Rows
  • Columns
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

What is the purpose of DoEvents in VBA?

  • Allows other operations to run
  • Ends a loop
  • Pauses execution
  • Ends the macro
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 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 "ByRef" keyword in VBA?

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

How do you check if a worksheet exists in VBA?

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

Which statement is used to declare a variable in VBA?

  • var
  • dim
  • declare
  • variable
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

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

  • Public
  • Private
  • Protected
  • Static
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 With statement in VBA?

  • To simplify code by grouping statements
  • To define new variables
  • To create a new worksheet
  • To execute a function
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

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

Which function returns the current date in VBA?

  • Date
  • Now
  • Today
  • CurrentDate
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 "On Error Resume Next" statement in VBA?

  • Ignore errors and continue execution
  • Exit the current loop
  • Stop execution
  • Display an error message
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

How do you reference a cell in VBA?

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

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