Simple macro causing Error7: Out of memory ?

theta

Well-known Member
Joined
Jun 9, 2009
Messages
960
Hi All

I have a macro that imports an XML file, removes the namespace from the schema headers

So effectively left with a large table (A1:CC127385)

When I then try to perform some simple actions on this, I get Error 7. When using less data (smaller range) it works fine no problem

Thoughts?

Code:
    With oWS
       .UsedRange.Value = oWS.UsedRange.Value 'prevent numbers stored as text
       .Name = "XML Data"
       .Tab.Color = 49407
       .AutoFilterMode = False
       .Cells(1, nLastCol).AutoFilter
       .Range("A2").Select 'for Freeze Panes
    End With
    ActiveWindow.FreezePanes = True

Thanks guys
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Further from last. It fails when it tries to do the .Name element

When I run through on debug mode, the sheet has the first two rows highlighted.

If I manually select A1:CC13000 then I can do paste/special values etc...

Thoughts?
 
Upvote 0

Forum statistics

Threads
1,224,559
Messages
6,179,513
Members
452,921
Latest member
BBQKING

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top