2009/9/5 Bernard Marcelly <[email protected]>:
> Message de Johnny Rosenberg date 2009-09-05 13:24 :
>>
>> MyArray().Nick=TempArray(0) ' This line produces the error message
>> ”BASIC runtime error. Object variable not set.”
>>
>> Then I expect the following variables containing the following:
>> MyArray(1).Nick="One"
>> MyArray(2).Nick="Two"
>> MyArray(3).Nick="Three"
>> MyArray(4).Nick="Four"
>> MyArray(5).Nick="Five"
>> MyArray(6).Nick="Six"
>> MyArray(7).Nick="Seven"
>> MyArray(8).Nick="Eight"
>>
>> Am I totally approaching this the completely wrong way?
>
> Yes.
>
> Basic does not allow this (and probably no other language).
> You can assign an array of String to an array of String, or to a Variant.
> But not to a string in each structure of an array of structures.
>
> Regards
> Bernard
But it would be very nice if it worked…
OK, that's not a big deal. This works:
Dim TempArray0(7) As String
Dim i As Integer
TempArray0()=TempArray(0)
For i=1 To 8
MyArray(i).Nick=TempArray0(i)
Next i
I was just hoping to solve it without a For statement.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]