Question about Array (Resolved)
I am having a problem with an array. Here is the code:
VB Code:
Dim strStaticZip As String = "49093"
Dim ZipArray(5) As String
ZipArray(0) = "49015"
ZipArray(1) = "49418"
ZipArray(2) = "49001"
ZipArray(3) = "49002"
ZipArray(4) = "49006"
Dim i As Integer
For i = 0 To ZipArray.Length - 1
LookUpZipCode(strStaticZip, ZipArray(i))
ListBox1.Items.Add(Format(CalcDistance(), "F").ToString)
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?