View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
gti_jobert[_56_] gti_jobert[_56_] is offline
external usenet poster
 
Posts: 1
Default Macro to delete worksheets


Hi, just off the top of my head this is what I got:


Code:
--------------------

Public Sub Main()
For i = 1 To Sheets.Count
If TypeName(Sheets(i)) = "Worksheet" Then
Sheets(i).Activate
If ActiveSheet.Cells(Y, X).Value = "" Then
Application.DisplayAlerts = False
ActiveSheet.Delete
Application.DisplayAlerts = True
End If
End If
Next
End Sub

--------------------


Not tried the code, perhaps someone else knows a better way?


--
gti_jobert
------------------------------------------------------------------------
gti_jobert's Profile: http://www.excelforum.com/member.php...o&userid=30634
View this thread: http://www.excelforum.com/showthread...hreadid=521753