Set C = CreateObject("Excel.Application") Set D = C.Workbooks.Open("C:\Users\Admin\Desktop\test.xlsx") D.Worksheets("sheet1").Delete D.Close True Set C = Nothing
Set D = C.Workbooks.Open("d:\test.xlsx") Set sh = D.Worksheets.Add sh.Name = "newsheet" D.Close True Set C = Nothing