View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Delete all sheets except the active one...?

Try this...

dim wks as worksheet

application.displayalerts = false
for each wks in worksheets
if wks.name < activesheet.name then wks.delete
next wks
application.displayalerts = true

--
HTH...

Jim Thomlinson


"derobin" wrote:

"Delete all sheets except the active one...?"
How can I do that in VBA, anyone?

thx Robin