Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello All,
I'm hoping to find a Win32 API which will provide me the memory size of a safe array dimmed in VBA. Here's what I am trying to solve... I currently calculate a moving average of the last x elements stored within an array. Step one is to find the last element used within the array, for which I currently use a self-written binary search. Next, I use a Win32 api to copy the segment of memory (CopyMemory) containing the elements I want to average into another array so that I can execute: Avg = Application.Average(arrayTwo) The slowest part of this oppoeration is the binary search. So, I was hoping to get the size of the memory used by the array and then devide the returned value by the number of bytes per element to determin the number of the last element used within the array. (Please note, Ubound only gives me the upper bound of the array, not the last used element in the array). Any ideas?? Thanks! Trip |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Memory and File Size Management | Excel Discussion (Misc queries) | |||
Memory and File Size | Excel Discussion (Misc queries) | |||
Size/memory limitations for vlookup fixed in the new Excel? | Excel Discussion (Misc queries) | |||
Displaying the size of the dataset currently in memory | Excel Programming | |||
xls file size / memory errors | Excel Programming |