Thread
:
Deleting a sheet if it exists?
View Single Post
#
2
Posted to microsoft.public.excel.programming
Don Guillett
external usenet poster
Posts: 10,124
Deleting a sheet if it exists?
try
Sub deletesheets()
Application.DisplayAlerts = False
On Error Resume Next
myarray = Array("sheet1", "sheet4", "sheetetc")
Sheets(myarray).Delete
End Sub
--
Don Guillett
SalesAid Software
"drucey" wrote in
message ...
Me again!
Flying along nicely, apart from...
In a macro i have:
Sheets("Completed Orders").Delete
Sheets("Partially Arrived Orders").Delete
Sheets("Draft Orders").Delete
Sheets("Placed Orders").Delete
But coming from another macro that's already deleted them (in some
cases only)..
How would i say
IF sheet "completed orders" exists then delete else not to worry
Thanks all
--
drucey
------------------------------------------------------------------------
drucey's Profile:
http://www.excelforum.com/member.php...o&userid=32553
View this thread:
http://www.excelforum.com/showthread...hreadid=523544
Reply With Quote
Don Guillett
View Public Profile
Find all posts by Don Guillett