View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
ryguy7272 ryguy7272 is offline
external usenet poster
 
Posts: 2,836
Default source sheet name as a wild card

This is how I do it:
Application.DisplayAlerts = False
Dim sh As Worksheet

For Each sh In ActiveWorkbook.Worksheets
If InStr(1, sh.Name, "Sheet1") Then
sh.Select False
Else
sh.Delete
End If
Next sh
Application.DisplayAlerts = True

Anything with Sheet1 in the name will be ignored; Sheet1, Sheet11, Sheet111,
etc.

HTH,
Ryan---