|
-
Jun 18th, 2004, 10:00 AM
#1
Thread Starter
Hyperactive Member
Worksheets in Excel - Releasing Memory
I have done some research and found that the number of worksheets allowed to be created in a workbook is based on the systems memory.
I have an automated workbook that can, and will, create 200+ worksheets.
Now, once i get to a certain amount (120 the last time) it just stopped...ven the copy function was looping, no pages were created.
BUT, when i closed out the workbook, and then re-opened it, and started again, it created the remaining worksheets. So, I am guessing it was 'holding' on to memory as it was going along.
IS there a way to release any memory it is using when it creates a worksheet, so i don't have to have to close it out, each time, and re-open it?
FYI: I already have DoEvents in all of my LOOPs.
I also have this function:
Code:
Public Function Holding(Sec As Integer)
Dim i As Long
If Sec = 0 Then Exit Function
For i = 0 To Sec
Call Sleep(1000)
DoEvents
Next
End Function
And i use it after each 'grouping' of sheets to be created, wth 5 seconds as the value passed.
-
Jun 21st, 2004, 03:50 AM
#2
Just a thought, would saving the worksheet solve the problem?
As another thought, why 200+ sheets in a spreadsheet? Time to move to a database????
Vince
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|