You want to run a macro named FormatReport by clicking a button on your Excel sheet. Which step correctly assigns the macro to the button?
Think about how Excel links buttons to macros without typing formulas.
To run a macro from a button, you right-click the button, choose 'Assign Macro', then pick the macro name. Other options either don't link macros or use wrong methods.
You run this macro to clear cells A1 to A3. What will be the value in cell A2 after running?
Sub ClearCells()
Range("A1:A3").ClearContents
End SubClearContents removes the content but not the cell itself.
The ClearContents method empties the cells' contents, so A2 becomes empty (blank).
You want to run a macro named UpdateSummary from another macro. Which VBA statement correctly runs it?
Think about the VBA keyword used to call another macro or procedure.
The correct way to run another macro in VBA is to use Call MacroName or simply MacroName. The other options are not valid VBA statements.
A macro runs and deletes all rows where column B is empty. After running, how many rows remain if the original data had 10 rows and 3 had empty cells in column B?
Sub DeleteEmptyRows() Dim i As Integer For i = 10 To 1 Step -1 If Cells(i, 2).Value = "" Then Rows(i).Delete Next i End Sub
Rows with empty column B cells are deleted one by one from bottom to top.
The macro deletes rows where column B is empty. Since 3 rows have empty column B, those 3 are deleted, leaving 7 rows.
Which macro security setting in Excel allows macros to run only if they are digitally signed by a trusted publisher?
Think about the setting that trusts only signed macros.
The setting 'Disable all macros except digitally signed macros' allows only macros signed by trusted publishers to run, blocking unsigned macros.