Ok. This is my 2nd time to ask about ending a loop. I got help with the 1st & it works great!! I tried using the template of that one to make my next one work without success. The macro repeats the same action on multiple worksheets and I need it to stop and go to the next step when there are no other sheets. Here is what I currently have.
Application.ScreenUpdating = False
Do
If Not ActiveSheet.Next.Select Is Nothing Then----This doesn’t work.
Cells.Select
Selection.Copy
ActiveSheet.Next.Select
X
X
X
X
X
Else
Exit Do
End If
Loop
Application.ScreenUpdating = True
Application.ScreenUpdating = False
Do
If Not ActiveSheet.Next.Select Is Nothing Then----This doesn’t work.
Cells.Select
Selection.Copy
ActiveSheet.Next.Select
X
X
X
X
X
Else
Exit Do
End If
Loop
Application.ScreenUpdating = True