View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Ms-Exl-Learner Ms-Exl-Learner is offline
external usenet poster
 
Posts: 506
Default VBA Code Required for deleting All Sheets except Sheet1

Thank you its working fine but if I run the Macro then its asking me to
Confirm Do you want to delete this sheet like that for each and every
worksheet before deleting. I am having 200 sheets for 200 times I need to
click or Press enter for deleting the sheets.

Please help me€¦

--------------------
(Ms-Exl-Learner)
--------------------



"Gary''s Student" wrote:

Sub SheetRemover()
k = Sheets.Count
For i = k To 2 Step -1
Sheets(i).Delete
Next
End Sub

--
Gary''s Student - gsnu200908


"Ms-Exl-Learner" wrote:

Please help to delete all the sheets in a workbook except the First sheet
(i.e.) Sheet1.

Thanks for reading.

--------------------
(Ms-Exl-Learner)
--------------------