Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
wrote:
Any variable that I set up that is 300 x 4100 x 34 runs out of memory. I had no problem executing the following macro: Sub doit() Dim v(1 To 300, 1 To 4100, 1 To 34) As Long Dim n As Long, st As Double st = Timer For i = 1 To 300: For j = 1 To 4100: For k = 1 To 34 n = n + 1 v(i, j, k) = i * 1000000 + j * 100 + k Next k, j, i MsgBox n & " " & Format(Timer - st, "0.000 sec") End Sub The array v consumes 167,280,000 bytes. Task Manager showed that the peak usage was about 186,968,064 bytes. Note the peak usage for Excel (new workbook) and VBA (trivial macro) is about 19,402,752. So the numbers are about right. The run time was about 10.5 seconds. Of course, that is for my version of Excel (2003) on my computer. YMMV. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
General Question | Excel Discussion (Misc queries) | |||
general question about variables | Excel Discussion (Misc queries) | |||
General Question | Excel Discussion (Misc queries) | |||
General question | Excel Programming | |||
General Question | Excel Programming |