LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 896
Default VBA Code Required for deleting All Sheets except Sheet1

forgot to include the

Application.DisplayAlerts = False
....
Application.DisplayAlerts = True

part


On 3 Lis, 10:10, Jarek Kujawa wrote:
Sub delsheets()
Dim sh as Sheet

For Each sh in ActiveWorkbook.Sheets
If sh.Name<"Sheet1" Then
sh.Delete
End If
Next sh

End Sub

On 3 Lis, 09:46, 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)
--------------------- Ukryj cytowany tekst -


- Pokaż cytowany tekst -


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Form Code Required John Calder New Users to Excel 3 October 27th 09 10:29 PM
Another VB Code Required TGV Excel Discussion (Misc queries) 7 February 7th 09 07:21 AM
VB Code Required TGV Excel Discussion (Misc queries) 3 February 6th 09 05:31 PM
code is not to work on sheet1 Allan R Jeffery New Users to Excel 3 August 22nd 06 02:22 PM
How do I set up a workbook so changing Sheet1 changes all sheets? rach1027 Excel Worksheet Functions 1 June 7th 05 10:12 AM


All times are GMT +1. The time now is 12:23 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"