Excel 2013 VBA very slow on some PCs

We have an Excel VBA macro that takes 9 minutes to complete on one PC while most run the macro in about 30 seconds. I can get to this section of the macro in the problem PC in about 19 seconds but executing the .Clear takes over 2 minutes.

Note that this macro is a carryover from 2001 and we've had to modify it to run on the newer versions of Excel. All Computers are using Excel 2013 but the version varies slightly (15.0.4753.1000 vs. 15.0.4745.1000)

' Clear error flags
    Range(Cells(2, 1), Cells(sze, 1)).Clear

Open in new window

Local variables:
sze = 238
LVL 30
Randy DownsOWNERAsked:
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.

[ fanpages ]IT Services ConsultantCommented:
What are you attempting to clear?

Is there any difference if you use the ClearContents method instead?

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
Randy DownsOWNERAuthor Commented:
ClearContents seems to work better. Has Clear become devalued?
Randy DownsOWNERAuthor Commented:
That seems to have fixed it. What;s the difference in .Clear & .ClearContents ?
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

[ fanpages ]IT Services ConsultantCommented:
Clear removes in-cell formulae/values and formatting.
ClearContents just removes the formulae/values.
Randy DownsOWNERAuthor Commented:
OK, I think we can live without the formatting being cleared. Thanks for the speedy advice
Randy DownsOWNERAuthor Commented:
works great for my application. No idea why  Clear takes so long when ClearContents zip right on.
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
Microsoft Excel

From novice to tech pro — start learning today.