Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Deleting worksheets
glad to help
-- Don Guillett SalesAid Software "Alan L. Wagoner" wrote in message ... 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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro for Deleting Worksheets | Excel Discussion (Misc queries) | |||
Deleting worksheets | Excel Discussion (Misc queries) | |||
Prompt before deleting worksheets? | Excel Discussion (Misc queries) | |||
Help deleting worksheets | Excel Discussion (Misc queries) | |||
Deleting worksheets | Excel Programming |