VBA run out of memory

The code Zone_Change worked on a small set of data, but with larger data I get a memory error.

Line -      rngData = .Range("A2:BD" & .UsedRange.Rows.Count).Value
Is there another method other than the array?

I attached the entire project.
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.

Martin LissOlder than dirtCommented:
Try closing Excel and reopening it. You could try rebooting your PC.
Euro5Author Commented:
Right, thanks for mentioning. I should have said that I did try that. It does most often work, but unfortunately didn't this time.
Martin LissOlder than dirtCommented:
You could also include only the columns that you actually need to work with like


Do similar when you put the results back on the sheet.
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!

Saurabh Singh TeotiaCommented:
I run this line Euro..I dont face any problem..try closing the excel and open it again and run the code again..

Or you can try using this lines...

Dim lrow As Long

lrow = .Cells.Find(What:="*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row
    ' Copy the cell values (ignoring the headers) from columns A to BD to an array
    rngData = .Range("A2:BD" & lrow).Value

Open in new window


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
Martin LissOlder than dirtCommented:
Actually with my code you'd need to do

Dim lngRows As Long
lngRows = ActiveSheet.UsedRange.Rows.Count

rng = Range("A2:C" & lngRows, "F2:J" & lngRows, "M2:BD" & lngRows)

Got to go. Play calls (actually a play)
Euro5Author Commented:
I think that you offered this before - it worked again.
I think there are some other places that this will be helpful.
Euro5Author Commented:
@Martin - what play!??
Martin LissOlder than dirtCommented:
West Side Story
Euro5Author Commented:
Nice. Hope you enjoy! Love musicals and opera.
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.