Just created 1800 sheets by not closing a loop, just wondering if anyone has a quick solution to delete all of these apart from the first three
George
Just created 1800 sheets by not closing a loop, just wondering if anyone has a quick solution to delete all of these apart from the first three
George
Well if you go to the 4th sheet tab click on it and hold down shift, then press the last sheet button, then click on the last sheet, all the sheets are highlighted. Then right click and select delete.
Regards
Dav
Next time close the workbook without saving
For a VBA methoid
![]()
Option Explicit Sub deleteShts() Dim sht As Worksheet With Application .DisplayAlerts = False .ScreenUpdating = False For Each sht In ThisWorkbook.Worksheets If sht.Index > 3 Then sht.Delete Next sht .DisplayAlerts = True .ScreenUpdating = True End With End Sub
Last edited by royUK; 11-05-2008 at 04:52 AM.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Thank you that worked great saved about an hour of deleting woorksheets
George
Glad we helped.
Can you mark the thread solved?
Also, please don't use unnecessary words in titles like "odd question"
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks