LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Delete Tab Formula Problem


I am having problem with the following code. A member was nice of
enough to provide the following:

Sub DeleteTabs()
On Error Resume Next
Application.DisplayAlerts = False

For Each x In Worksheets
If IsEmpty(x.UsedRange) Then x.Delete
Next x

Application.DisplayAlerts = True

End Sub

I thought using searchs and such I would be able to figure out how to
make this work, wrong, so here I am looking for some again.

What I am trying to do is delete unsed worksheets in a single workbook.
The workbook has 20 worksheets but not all sheets are used all the time
and I would like to delete the extra sheets. All sheets have same
number of rows, columns, so, if cell f286 = 0 delete sheet and go to
next sheet etc.

Any help for this newbie would be great!

Thanks,


--
greengrass
------------------------------------------------------------------------
greengrass's Profile: http://www.excelforum.com/member.php...o&userid=23119
View this thread: http://www.excelforum.com/showthread...hreadid=376570

 
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
Problem Using Delete Key Because of Combobox Joseph Fletcher Excel Discussion (Misc queries) 11 February 23rd 07 01:45 PM
Delete syntax problem anny Excel Worksheet Functions 3 January 27th 06 03:59 AM
Delete problem Loi New Users to Excel 3 December 8th 04 01:35 AM
Delete Sheets Problem Edgar Thoemmes[_4_] Excel Programming 3 October 27th 04 12:32 PM
Name Delete Problem Again Meme Excel Programming 1 April 9th 04 03:31 AM


All times are GMT +1. The time now is 08:30 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"