Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dear Excel Gurus,
I am thinking of ways to optimize a slow Excel VBA program. Will using fixed array size instead of dynamic array significantly speed up the operation? Also, I have been using dynamic arrays but did not use Redim. Is this wrong? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That would depend on factors, such as
- how much of the fixed array is populated/empty - how will you populate the arrays, etc. Time both options, and see which is best, but my guess is that the time spent is elsewhere, unless you do a lot of array processing. How did you build a dynamic array without using Redim? -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Sing" wrote in message ... Dear Excel Gurus, I am thinking of ways to optimize a slow Excel VBA program. Will using fixed array size instead of dynamic array significantly speed up the operation? Also, I have been using dynamic arrays but did not use Redim. Is this wrong? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
How did you build a dynamic array without using Redim?
You can use an assignment from the Split and Array functions, as well the directly assigning another (already dimensioned) array, to do that. Rick |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I wouldn't call that building a dynamic array in either case.
-- --- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Rick Rothstein (MVP - VB)" wrote in message ... How did you build a dynamic array without using Redim? You can use an assignment from the Split and Array functions, as well the directly assigning another (already dimensioned) array, to do that. Rick |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm not sure, then, that I understand your use of the word "building". Why
would something like this.... Dim Items() As String Items = Split("One,Two,Three,Four", ",") or this... Dim Things() As Variant Things = Array(1, 2, 3, 4) not be considered building a dynamic array? As a side point, you introduced the word "building"... the OP's original statement was "Also, I have been using dynamic arrays but did not use Redim." Rick "Bob Phillips" wrote in message ... I wouldn't call that building a dynamic array in either case. "Rick Rothstein (MVP - VB)" wrote in message ... How did you build a dynamic array without using Redim? You can use an assignment from the Split and Array functions, as well the directly assigning another (already dimensioned) array, to do that. |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Because the array is fixed, not pre-determined perhaps, but fixed, it cannot
flex as the code proceeds. That is what I understand by dynamic. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Rick Rothstein (MVP - VB)" wrote in message ... I'm not sure, then, that I understand your use of the word "building". Why would something like this.... Dim Items() As String Items = Split("One,Two,Three,Four", ",") or this... Dim Things() As Variant Things = Array(1, 2, 3, 4) not be considered building a dynamic array? As a side point, you introduced the word "building"... the OP's original statement was "Also, I have been using dynamic arrays but did not use Redim." Rick "Bob Phillips" wrote in message ... I wouldn't call that building a dynamic array in either case. "Rick Rothstein (MVP - VB)" wrote in message ... How did you build a dynamic array without using Redim? You can use an assignment from the Split and Array functions, as well the directly assigning another (already dimensioned) array, to do that. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Speed of array formula | Excel Worksheet Functions | |||
Redimming an array dynamically assigned from range (how to redim first dimension of a 2-D array? /or/ reverse the original array order) | Excel Programming | |||
Dynamic Array Lbound not working when only one value in array | Excel Programming | |||
Worksheet speed with array formula | Excel Discussion (Misc queries) | |||
Speed up performance for very big array | Excel Programming |