Out of Memory


Posted by Keith on June 12, 2000 8:34 AM

I've got a macro that involves copying Charts.

The problem is after running for a while, I get an error message stating "Out of memory"

Is there a way that it can be side tracked?

Is it based on the PC's spec?

Cheers Keith.

Posted by Keith on June 14, 0100 12:08 AM

Re: My Solution

Thanks for the advice.

Every thing else runs smoothly except this code. I don't think it was meant to be. Back to the drawing board...

Once again, Cheers.

Keith.


Posted by Keith on June 13, 0100 1:04 AM

INFO

Sorry for delay.

I believe we are using Pentium 200's(?) with MMX and 64 MB ram. (Compaq Deskpro).

The file sizes are 208KB for the main excel Workbook with the macro that is running.
And the file being used is 335KB after saving it before "Out of memory" kicks in (257KB before).

Hope this helps, unfortunatly getting Specs on these OLD PC's is like getting blood from a stone.

Keith.

Posted by Garry on June 13, 0100 1:49 AM

Re: INFO

Keith,

Machine spec is fine, I've used smaller Compaqs to manipulate 45mb files. Can you include a little more detail on the file content and macro activity.

Posted by Keith on June 13, 0100 2:02 AM

Code added

Garry, here is my code. (a bit crude but works until the memory pops into the equation).


Range("A5:B14").Select
Application.CutCopyMode = False
Charts.Add
ActiveChart.ChartType = xlArea
ActiveChart.SetSourceData Source:=Sheets("Test1").Range("A5:B14" _
), PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Test1"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Revenue"
End With
ActiveChart.HasLegend = True
ActiveChart.Legend.Select
Selection.Position = xlTop
ActiveChart.SeriesCollection(1).Select
With Selection.Border
.Weight = xlThin
.LineStyle = xlAutomatic
End With
Selection.Shadow = False
With Selection.Interior
.ColorIndex = 3
.Pattern = xlSolid
End With
ActiveWindow.Visible = False
Windows("new.xls").Activate
Range("A16:B25").Select
Charts.Add
ActiveChart.ChartType = xlArea
ActiveChart.SetSourceData Source:=Sheets("Test1").Range( _
"A16:B25"), PlotBy:=xlColumns
ActiveChart.Location Where:=xlLocationAsObject, Name:="Test1"
With ActiveChart
.HasTitle = False
.Axes(xlCategory, xlPrimary).HasTitle = False
.Axes(xlValue, xlPrimary).HasTitle = True
.Axes(xlValue, xlPrimary).AxisTitle.Characters.Text = "Minutes"
End With
ActiveChart.HasLegend = Tr

Posted by Garry on June 12, 0100 8:42 AM

What spec PC is it, Which other Apps are running, How large are the workbooks??



Posted by david on June 13, 0100 9:32 PM

My Solution

Keith I had a similar problem myself. My solution was to go to the window\temp directory and delete all large or unneccesary files. If you don't use this folder just delete the files in it. Excel uses space from this for running files. Keith, Machine spec is fine, I've used smaller Compaqs to manipulate 45mb files. Can you include a little more detail on the file content and macro activity.