Results 1 to 7 of 7

Thread: Multi - Dimensional Array

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    67

    Multi - Dimensional Array

    When i declare the following array i keep getting error saying Expected ')' on line shown below. If you know why please enlighten me.

    Dim MultiArray(1 To 5, 1 to 5)

  2. #2
    Frenzied Member vbgladiator's Avatar
    Join Date
    May 2001
    Posts
    1,950
    No error here.

  3. #3
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    Your code is okay.
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4
    Hyperactive Member GlenW's Avatar
    Join Date
    Nov 2001
    Location
    Gateshead, England
    Posts
    479
    Sure you put the comma in your code?

  5. #5
    Si_the_geek
    Guest
    check the other code around it - you are probably missing something somewhere else..

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Feb 2002
    Posts
    67
    its deffinately showing as an error, im saving the file as a vbs file would that make a difference? If so have you got any idea how i declare an array for us with WSH.

    thanks

  7. #7
    Hyperactive Member Filter300's Avatar
    Join Date
    Aug 2001
    Posts
    413
    if your doing this in VB script its alittle different....
    arrays always start at zero so you can only specify the ubound.
    so if you wanted your upper bound to be 5 this is how you would do it...

    Dim Array(5,5)

    but since you had 1-5 you would want

    Dim Array(4,4) this will give you 0-4, 0-4

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