This topic has not yet been rated - Rate this topic

Sheets.Delete Method 

Deletes the object.

Namespace: Microsoft.Office.Interop.Excel
Assembly: Microsoft.Office.Interop.Excel (in microsoft.office.interop.excel.dll)

'Usage
Dim sheets1 As Sheets
sheets1.Delete()
void Delete();
public void Delete();
function Delete();
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
Deleting a Worksheet Without Prompting the User

In the following Visual Basic example, you first turn off any messages asking if you want to save the worksheet. Next, you delete the worksheet and turn the alert message back on.

Sub SaveWorksheet()
   Application.DisplayAlerts = False
   ActiveSheet.Delete
   Application.DisplayAlerts = True
End Sub


http://msdn.microsoft.com/en-us/library/bb978780.aspx#DevGuideExcel2007AppObject_AdditionalTasksUsingtheApplicationObject