"Code Execution has been Interrupted" (1 Viewer)

proballin

Registered User.
Local time
Today, 13:54
Joined
Feb 18, 2008
Messages
105
I am going through an excel sheet and deleting a whole row of cells using the following code:

Code:
    Do While Not IsEmpty(Cells(r, 21))
        Cells(r, 21).Select
        Selection.ClearContents
        Cells(r, 22).Select
        Selection.ClearContents
        r = r + 1
    Loop

However everytime I run about half way through I get the message, "Code Execution has been Interrupted". I click "Continue" and it finishes up fine. Why is this appearing and how do I stop it from coming up so I can just run straight through the macro?
 

Users who are viewing this thread

Top Bottom