Delete sheets

  • Thread starter Thread starter Dias
  • Start date Start date
D

Dias

Hi !
How can i delete sheets select name in list ?
I have a list of countries each one has a sheet with is name.
Wat i want is a code that wen i select one of those countries in the
list i can delete that sheet.
Sorry my English
Regards
Horacio
 
Right click sheet tab of list>view code>insert this.

Private Sub Worksheet_BeforeDoubleClick _
(ByVal Target As Range, Cancel As Boolean)
On Error GoTo nosheet
Application.DisplayAlerts = False
Sheets(CStr(Target)).Delete
Application.DisplayAlerts = True
nosheet:
End Sub
 
Back
Top