Delete an Excel worksheet
How to delete a single Excel worksheet using Excel, VBA and Shortcut methods
1. Right-click on the worksheet that you want to delete. 2. Click Delete. Note: in this example we are deleting Sheet2. |
METHOD 2. Delete an Excel worksheet using the ribbon option
EXCEL
1. Select the worksheet that you want to delete. Note: in this example we are deleting Sheet2. |
2. Select the Home tab. |
3. Click Delete in the Cells group. 4. Click Delete Sheet. |
Worksheets("Sheet2").Delete
End Sub
Worksheets: The Worksheets object represents all of the worksheets in a workbook, excluding chart sheets.
Worksheet Name: Have a worksheet named Sheet2.
Minimum Number of Worksheets: The workbook has at least two worksheets.
ADJUSTABLE PARAMETERS
Worksheet Selection: Select the worksheet that you want to delete by changing the Sheet2 worksheet name in the VBA code to any worksheet in the workbook.
METHOD 2. Delete an Excel worksheet using VBA with a Sheets object
VBA
Sheets("Sheet2").Delete
End Sub
Sheets: The Sheets object represents all of the sheets in a workbook, including worksheets and chart sheets.
Worksheet Name: Have a worksheet named Sheet2.
Minimum Number of Worksheets: The workbook has at least two worksheets.
ADJUSTABLE PARAMETERS
Worksheet Selection: Select the worksheet that you want to delete by changing the Sheet2 worksheet name in the VBA code to any worksheet in the workbook.
METHOD 3. Delete an Excel worksheet using VBA using sheet reference
VBA
Sheet2.Delete
End Sub
Sheets: The Sheets object represents all of the sheets in a workbook, including worksheets and chart sheets.
Minimum Number of Worksheets: The workbook has at least two worksheets.
ADJUSTABLE PARAMETERS
Sheet Reference Selection: Select the worksheet that you want to delete by changing the sheet reference, in the VBA code, to the sheet reference that refers to the worksheet that you want to delete.
NOTES
Select the worksheet you want to delete, then action the shortcut.
This tutorial explains and provides step by step instructions on how to delete a single worksheet using Excel, VBA and Shortcut methods.
Excel Methods: Using Excel you can delete a worksheet with a ribbon or sheet option.
VBA Methods: Using VBA you can delete a worksheet referencing to a Worksheets or Sheets object.
Shortcut Method: Using a Shortcut you can delete a selected worksheet.