Fenrirshowl
Technical User
I've been using the same spreadsheet for several months and it's grown to about 24Mb. Today, it fails to open - I just get a "not responding" from task manager no matter how long I leave it.
There is one particular sheet I need access to and I am at the point where I don't overly need the backing calculations, just the values. [The data (23,500 rows by 30 cols) would have been better in Access but the powers that be would only have it in Excel.] I am trying to recreate the values in a new spreadsheet by linking them to the same cell location on the original. In order to get rid of the links, I copy and paste the values. Every 1000 cells or so I save the document.
Unfortunately I am running out of Memory on a regular basis, so I am: breaking the code, saving the spreadsheet, closing excel, starting it up again with a clear memory and rerunning the macro I've set up. I've got bored of this and I don't want to have to babysit my machine when I could be doing other things.
I am hoping someone can tell me how to clear the memory without having to shut down excel so I can set up some error handling.
Also, if anyone has an idea about how many formulas I can add to link the sheets at one time I would appreciate a pointer(currently I am adding them one at a time in a hope to minimise system resources).
Here's the code I am using:
All help gratefully received.
Fen
There is one particular sheet I need access to and I am at the point where I don't overly need the backing calculations, just the values. [The data (23,500 rows by 30 cols) would have been better in Access but the powers that be would only have it in Excel.] I am trying to recreate the values in a new spreadsheet by linking them to the same cell location on the original. In order to get rid of the links, I copy and paste the values. Every 1000 cells or so I save the document.
Unfortunately I am running out of Memory on a regular basis, so I am: breaking the code, saving the spreadsheet, closing excel, starting it up again with a clear memory and rerunning the macro I've set up. I've got bored of this and I don't want to have to babysit my machine when I could be doing other things.
I am hoping someone can tell me how to clear the memory without having to shut down excel so I can set up some error handling.
Also, if anyone has an idea about how many formulas I can add to link the sheets at one time I would appreciate a pointer(currently I am adding them one at a time in a hope to minimise system resources).
Here's the code I am using:
Code:
Sub enter_linked_data()
Application.ScreenUpdating = False
For y = 2 To 31
x = 1
While x < 23500
Cells(x, y).Select
rng = ActiveCell.Address
Range(rng) = "='C:\My Documents\[MyWorkbook.xls]Sheet1'!" & rng
ActiveCell.Copy
Range(rng).PasteSpecial xlPasteValues
If Range(rng) = 0 Then Range(rng).ClearContents
If Int(x / 1000) = x / 1000 Then ActiveWorkbook.Save
x = x + 1
Wend
Next y
Application.ScreenUpdating = True
End Sub
All help gratefully received.
Fen