View Single Post
  #33   Report Post  
Posted to microsoft.public.excel.programming
Howard Howard is offline
external usenet poster
 
Posts: 536
Default Copy adjacent Sheet and name from a list



same as add sheets:



Sub DeleteSheets()

Dim arrNames

Dim n As Integer



Application.DisplayAlerts = False

arrNames = Selection

For n = LBound(arrNames) To UBound(arrNames)

Sheets(arrNames(n, 1)).Delete

Selection.Resize(, 5).ClearContents

Next

Application.DisplayAlerts = True

End Sub





Regards

Claus Busch


Code is in a module and I get an error on this line.
Tried it in the Summary sheet vb editor first and same error.

For n = LBound(arrNames) To UBound(arrNames)

Howard