Assuming you have an object variable set to the Excel Application (using
GetObject or CreateObject), you can do something like
XL.ActiveWorkbook.Worksheets("Sheet1").Delete
or
XL.ActiveWorkbook.Worksheet.Add
where XL is an object variable referring to the Excel Application. E.g.,
Public XL As Excel.Application
On Error Resume Next
Set XL = GetObject(,"Excel.Application") ' note leading comma
If XL Is Nothing Then
Set XL = CreateObject ("Excel.Application")
End If
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
(email address is on the web site)