Thread: Delete sheet
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default Delete sheet

right click sheet tabview codeinsert this. If you make a mistake, don't
SAVE the workbook.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$D$1" Then Exit Sub
Application.DisplayAlerts = False
Sheets(Target.Value).Delete
Application.DisplayAlerts = True
End Sub
--
Don Guillett
SalesAid Software

"Tom" wrote in message
...
I am wanting to enter the name of a worksheet in D1, and have a macro that
looks for the worksheet with that name and automatically delete it without
prompts or warnings. Can someone help me out with that code?

Thanks so much