Arrays with two dimensions
if i declared an array with two dimensions (1 column and 981 rows), is it possible on calling that array just to call the first column??
for example:
Dim array(1 To 1, 5 To 981) As Variant
(the Vorgang(0)-item is another array with 1 dimension)
then an if-comparison:
If (Vorgang(0) = array(1)) Then
..........
End If
Is this possible? i don“t think so because there is always an error, but maybe i have to put a special item after the index (1) of the array to just call the first row.
thx, alex
Re: Arrays with two dimensions
Quote:
Originally posted by alexschiefert
VB Code:
Dim ary(1000,1) As Variant
'(the [B]Vorgang(0)[/B]-item is another array with 1 dimension)
If (Vorgang(0) = ary([color=red]row,col[/color])) Then
'..........
End If
Note : Array is a function (I think) so do NOT use it whilst variable naming.
Filling the first array, loop through and fill it. All arrays start at 0 in VB/VBA. Some collections, and the split function start at 1. Bear that in mind in the future, it'll prolly get you too ;)
Vince