E
Edward
Hi everybody,
I'm trying to pass an array to a bubble sort function but I get an error
type mismatch and I can't figure out why !
Any thoughts?
Sub test()
Dim MyArray(5) As String
MyArray(0) = "Bill"
MyArray(1) = "Amin"
MyArray(2) = "Tom"
MyArray(3) = "zibra"
MyArray(4) = "Carol"
BubbleSort (MyArray)
For i = LBound(MyArray) To UBound(MyArray)
Debug.Print MyArray(i)
Next i
End Sub
function BubbleSort(MyArray() As String)
'bubble sort code
End function
I'm trying to pass an array to a bubble sort function but I get an error
type mismatch and I can't figure out why !
Any thoughts?
Sub test()
Dim MyArray(5) As String
MyArray(0) = "Bill"
MyArray(1) = "Amin"
MyArray(2) = "Tom"
MyArray(3) = "zibra"
MyArray(4) = "Carol"
BubbleSort (MyArray)
For i = LBound(MyArray) To UBound(MyArray)
Debug.Print MyArray(i)
Next i
End Sub
function BubbleSort(MyArray() As String)
'bubble sort code
End function