Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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
|
|||
|
|||
![]()
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 | |
|
|
![]() |
||||
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 |