Hello Everybody!

as I tried to retrieve some Information from another excel File I stumbled
upon a failer. "NOT ENOUGH MEMORY" and "Runtime Error '1004': Unable To set
the formula Array Property of the Range Class"

I Checked My task mananger but the MEM Usage remained low during the running
of the Macro, The CPU Usage However Sky Roketed. While I have 512 MB Ram. I
enlarged the Swap File to 1500 but still it gives me the same failure.

I'm beginning to think it has something to do with the macro itself.
However, I can't see whats wrong. I hope someone sees it,

Thanks in Advance!


Sub GetValuesFromAClosedWorkbook(fPath As String, fName As String, sName,
cellRange As String)
With ActiveSheet.Range(cellRange)
.FormulaArray = "='" & fPath & "\[" & fName & "]" & sName & "'!" &
cellRange
.Value = .Value
End With
End Sub


Sub GrandeList()
Sheets.Add.Name = "GrandeList"
GetValuesFromAClosedWorkbook "C:\Documents and Settings\c9962403\Desktop",
"Kostenbeheerssysteem 6 april (12).xls", _
"Total D-Base", "F2:J63000"
Range("H1:H63000").Replace What:="0", Replacement:="", LookAt:=xlPart, _
SearchOrder:=xlByRows, MatchCase:=False
K = Sheets("GrandeList").Range("H65536").End(xlUp).Row
L = Sheets("GrandeList").Range("H65536").End(xlUp).Offset(1, 0).Row
Rows("" & L & "").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Delete Shift:=xlUp
GetValuesFromAClosedWorkbook "C:\Documents and Settings\c9962403\Desktop",
"Kostenbeheerssysteem 6 april (12).xls", _
"Total D-Base", "N2:S" & K & ""
Range("A:E,I:I,K:K,L:L,M:M,O:O").Select
Selection.Delete Shift:=xlToLeft
End Sub