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.
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.
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.
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
What spec PC is it, Which other Apps are running, How large are the workbooks??
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.