View Single Post
  #34   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

On Tuesday, April 9, 2013 12:32:53 AM UTC-7, Howard wrote:




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


The error is a type missmatch, sorry forgot to say in the other post.