Results 1 to 2 of 2

Thread: Arrays with two dimensions

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2004
    Posts
    12

    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

  2. #2
    Don't Panic! Ecniv's Avatar
    Join Date
    Nov 2000
    Location
    Amsterdam...
    Posts
    5,343

    Re: Arrays with two dimensions

    Originally posted by alexschiefert
    VB Code:
    1. Dim ary(1000,1) As Variant
    2.  
    3. '(the [B]Vorgang(0)[/B]-item is another array with 1 dimension)
    4.  
    5. If (Vorgang(0) = ary([color=red]row,col[/color])) Then
    6. '..........
    7. 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

    BOFH Now, BOFH Past, Information on duplicates

    Feeling like a fly on the inside of a closed window (Thunk!)
    If I post a lot, it is because I am bored at work! ;D Or stuck...
    * Anything I post can be only my opinion. Advice etc is up to you to persue...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width