I have a workbook with many sheets, and I am trying to delete the sheets that have a certain value in cell A1. My code will not continue going to the next sheets once the condition is not met. Can anybody help with this code?
Dim I As Integer
For I = 1 To Sheets.Count
ActiveSheet.Ran ge("A1").Selec t
If ActiveCell = "BUDGET" Then
Application.Dis playAlerts = False
ActiveSheet.Del ete
Application.Dis playAlerts = True
End If
Next
Dim I As Integer
For I = 1 To Sheets.Count
ActiveSheet.Ran ge("A1").Selec t
If ActiveCell = "BUDGET" Then
Application.Dis playAlerts = False
ActiveSheet.Del ete
Application.Dis playAlerts = True
End If
Next
Comment