View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett[_4_] Don Guillett[_4_] is offline
external usenet poster
 
Posts: 2,337
Default Deleting tabs in Excel

for each ws in worksheets
if ws.name<"nameone" and ws.name<"name2" then ws.delete
next

--
Don Guillett
SalesAid Software

wrote in message
oups.com...
Hi -

I have an Excel workbook with several tabs titled with #'s (Ex: 100,
205, 303, 544, etc.) Is it possible to create a macro that will delete
all the tabs except for a certain group? For example, I would want to
keep tab 205 and 303 but delete all the other ones.

Thanks
Stephen