You should never name something using a reserved word, like "integer" (VB is
not a case-sensitive language so "integer" and "Integer" are the same
thing). You were also unclear as to whether you already have 5 values and
just need to assign them to members of an array or whether you are using
values from the array to assign to 5 "elements" (whatever that means)
somewhere else.
Here's my best guess at what you are trying to do:
Sub Main()
Dim values As Integer(4) 'Notice the trailing parenthesis ()? This
means values should be an Integer array
values(0) = 27 'Made up value
values(1) = 32 'Made up value
values(2) = 16 'Made up value
values(3) = 7 'Made up value
values(4) = -12 'Made up value
'This assumes you already have some "element" (as you call it) and since
I don't know what you mean
'by "element", I can't know what property to set on it. But, this
should give you the idea
For i As Integer = 0 to values.length - 1
element(i) = values(i)
Next
End Sub
> I am working on an assignment and need some assistance if anyone could
> help:
[quoted text clipped - 14 lines]
>
> Thanks