Hi there,
im having a problem with calling a sub procedure ive created. When i call it it says
Compile error :
Type mismatch: array or user-defined type expected
il post the functions and then the call section.
Thats the function im trying to call. This is how im calling it. Im calling it in as the form loads.Code:Private Sub selection_sort_lott(ByRef lott_num(), ByRef lott_sort()) Dim outer As Integer Dim inner As Integer Dim minimum As Integer Dim temp As Integer For outer = 1 To 3 minimum = outer For inner = 1 To 3 If lott_num(inner) <= lott_num(minimum) Then minimum = inner End If Next inner lott_sort(outer) = lott_num(minimum) lott_num(minimum) = " " Next outer End Sub
Thanks for any help!Code:Private Sub Form_Load() Call selection_sort_lott(lott_num(), lott_sort())
p.s. if ive made a stupid nooby mistake, its cuz i am one!
p.p.s lott_num is an integer





Reply With Quote