Sub deleteWorksheet()
Dim wb As Workbook
Dim sh As Worksheet
Dim newSheetName As String
newSheetName = "March"
Dim fPath As String
fPath = "C:\myworkbook.xlsx"
Set wb = workbooks.Open(Filename:=fPath)
' delete first worksheet
Set sh = wb.Worksheets(1)
' also instead you can use Set sh = wb.Worksheets("shtname")
' Following statemet will launch an excel built in
' delete confirmation popup message.
' once you confirm it manually then this sheet would be deleted
Application.DisplayAlerts = False ' to disable to delete confirmation popup
sh.Delete ' now delete the sheet
Application.DisplayAlerts = True ' to disable to delete confirmation popup
End Sub
VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts