Results 1 to 10 of 10

Thread: Question about Array (Resolved)

Threaded View

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Nov 2005
    Posts
    259

    Question about Array (Resolved)

    I am having a problem with an array. Here is the code:
    VB Code:
    1. Dim strStaticZip As String = "49093"
    2.         Dim ZipArray(5) As String
    3.         ZipArray(0) = "49015"
    4.         ZipArray(1) = "49418"
    5.         ZipArray(2) = "49001"
    6.         ZipArray(3) = "49002"
    7.         ZipArray(4) = "49006"
    8.  
    9.         Dim i As Integer
    10.  
    11.         For i = 0 To ZipArray.Length - 1
    12.             LookUpZipCode(strStaticZip, ZipArray(i))
    13.             ListBox1.Items.Add(Format(CalcDistance(), "F").ToString)
    14.         Next
    The listbox gets these numbers, which it should:

    31.93
    64.85
    22.61
    17.92
    23.29

    But as soon as the function is done I get this error Parameter @Zip2 has no default value. and then it adds another 23.29 to the listbox (the distance of the last zip codes entered). I only want 5 numbers returned (the five zip codes in the array). What am I doing wrong?
    Last edited by FastEddie; Mar 25th, 2006 at 09:39 PM.

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