Igor,
sorry for over a monthly delay with the reply, I obviousy messed up my account's settings and wasnt notified about your question.
That is actually a very good question! I personally like the control's ReDim'ming, row deleting and string key indexing abilities very much, and do use it extensively
There are two reasons why I use seperate arrays:
1) I develop Excel add-ins, and I have to dump a grid's contents into a worksheet cells very often. The fastest way is assigning an array to a Range.Value property.
(example: on my computer, an array of (50,000 to 50) is displayed in 5.1 seconds if I use range.value assignment, and in 51.86 seconds if a For-Next cycle is used, even with ScreenUpdating, Calculation and Events turned off - see the code)
2) there are some classes in my addin that do additional calculation with array values - usually adding several columnds and filling it with values.
It would be very much appealing to do such calculations directly in an iGrid control, with all its obvious advantages,
BUT (a) I am not sure whether Calculate-Assign action will work faster in iGrid compared to vb array
and (b) see point 1 😞 . I still have to dump them onto an Excel worksheet.
So, basically that's how it works currently (see below), and if you have an idea of improving the process, I'd be much obliged!
Collect data from various sources ==>
build an array ==>
[Display an array in iGrid] ==>
Modify the array data based on rules or user input ==>
Display data to excel sheet or update sources
Besides, I have problems subclassing iGrid in Excel VBA (that's how I like it done), but that is yet another thread.
Edited by user
2014-12-10T11:19:04Z
|
Reason: messed up a preview