Greetings,
1- Open enclosed file.
2- Run Macro1.
After running Macro1 you will see that there is an error on red line...![]()
Sub Macro1() Dim ws As Worksheet Set ws = Worksheets(1) Do Until ws.Name = "Main" ws.Select Application.DisplayAlerts = False If Range("A1").Value Like "apple" Then ws.Delete Application.DisplayAlerts = True Set ws = ws.Next Loop End Sub
Any support will be appreciated.
Bookmarks