I am receiving an error on the first line of:

For INTROW = ActiveSheet.UsedRange.Rows.Count To 6 Step -1
        With ActiveSheet
            If .Cells(INTROW, 2) + .Cells(INTROW, 4) + .Cells(INTROW, 6) + .Cells(INTROW, 8) + .Cells(INTROW, 10) + .Cells(INTROW, 12) = 0 Then .Rows(INTROW).Delete
        End With
    Next INTROW

Open in new window

It used to work, but doesn't work now, and I haven't changed anything that I know of. All it is supposed to do is delete rows where the sum of certain cells is 0, for all cells in the UsedRange.

DOes anyone know of another way to accomplish that or how to fix the above?
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

zorvek (Kevin Jones)ConsultantCommented:
You may have saved the workbook as a 2007 or later workbook (.xlsm) which increases the number of rows from 32K to over a million. Change INTROW from an Integer to a Long.

Saqib Husain, SyedEngineerCommented:
You probably have

dim INTROW as integer

change it to

dim INTROW as long
Saqib Husain, SyedEngineerCommented:
I think the data size has recently exceeded 32K rows which is why the error never happened before
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

EnigmaMatterAuthor Commented:

The workbook has always been a .xlsb, and the UsedRange is usually around 50 rows, and ususally never more than a 1000.

When I change to Long, it freezes up.
Saqib Husain, SyedEngineerCommented:
When you press ctrl-end on the worksheet which row does it take you to?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
EnigmaMatterAuthor Commented:
Ah! It took me to blank rows, quite a ways down. I "deleted" the blank rows and now it works. Thanks! Works with Integer and Long.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
VB Script

From novice to tech pro — start learning today.