Johnny Andersson wrote:
The issue is that getDataArray() returns an array of arrays to handle the two dimensions. So it looks more like: Kunder=Array(array("a"), array("b"), array("c")) which is why you get an error when using addItems.
So if the data were in a row you could do something like: Ctl.addItems(Kunder(0),0)
If they are in a column then a loop to either create a one dimensional array then addItems or addItem.
By the way you don't need to create a cursor. Range.getDataArray will work.
Well, I will remember that. I guess that's what happens when learning from examples.
Do you know it there is a way to do this without using a loop or do I just have to give that idea up? The point in my case is, that those 13 rows in my example might grow a lot so speed is kind of relevant, especially since I am using a slow P2 450 MHz PC (which was very quick in early 1999.... ;D )
I think that you pretty much need to use a loop. GetDataArray is pretty fast, however...
-- Andrew Pitonyak My Macro Document: http://www.pitonyak.org/AndrewMacro.sxw My Macro Book: http://www.hentzenwerke.com/catalog/oome.htm Free Info: http://www.pitonyak.org/oo.php
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
