Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Deleting worksheets

Is there a way to delete worksheets using "*"?

I've got a bunch of sheets named IntTable, IntWork, Int...

I would like to be able to delete "Int*". These worksheets are generated
programmatically, so the need to be deleted programmatically as well.

Thanks in advance for the help.

--Alan


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,337
Default Deleting worksheets

one way
Sub deleteint()
Application.DisplayAlerts = False
For Each ws In Worksheets
If UCase(Left(ws.Name, 3)) = "INT" Then ws.Delete
Next
Application.DisplayAlerts = True
End Sub


--
Don Guillett
SalesAid Software

"Alan L. Wagoner" wrote in message
...
Is there a way to delete worksheets using "*"?

I've got a bunch of sheets named IntTable, IntWork, Int...

I would like to be able to delete "Int*". These worksheets are generated
programmatically, so the need to be deleted programmatically as well.

Thanks in advance for the help.

--Alan




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Deleting worksheets

Dim sh as Worksheet
for each sh in ActiveWorkbook.Worksheets
if lcase(left(sh.name,3)) = "int" then
Application.DisplayAlerts = False
sh.Delete
Application.DisplayAlerts = True
end if
Next

--
Regards,
Tom Ogilvy

"Alan L. Wagoner" wrote in message
...
Is there a way to delete worksheets using "*"?

I've got a bunch of sheets named IntTable, IntWork, Int...

I would like to be able to delete "Int*". These worksheets are generated
programmatically, so the need to be deleted programmatically as well.

Thanks in advance for the help.

--Alan




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Deleting worksheets

Many thanks Don and Tom!

"Alan L. Wagoner" wrote in message
...
Is there a way to delete worksheets using "*"?

I've got a bunch of sheets named IntTable, IntWork, Int...

I would like to be able to delete "Int*". These worksheets are generated
programmatically, so the need to be deleted programmatically as well.

Thanks in advance for the help.

--Alan




Reply
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
Macro for Deleting Worksheets andiam24 Excel Discussion (Misc queries) 2 April 2nd 09 03:47 PM
Deleting worksheets David Excel Discussion (Misc queries) 2 January 19th 07 08:19 PM
Prompt before deleting worksheets? cbrooks421 Excel Discussion (Misc queries) 2 July 20th 05 05:32 AM
Help deleting worksheets Wilhelmutt Excel Discussion (Misc queries) 2 April 19th 05 03:23 AM
Deleting worksheets Oscar Excel Programming 1 July 23rd 04 04:36 AM


All times are GMT +1. The time now is 12:15 PM.

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

About Us

"It's about Microsoft Excel"