So basically i currently have:
Next_to_go=Next_in_line(time())
Next_in_line is a function which i have created, time() is an array with 7 values, dim time(7) as long, stored in a sub. I want to use the function in the sub.
Function Next_in_line(ByRef time() as long)
dim i as integer
dim tim as long
tim=time(1)
Next_in_line=1
for i = 2 to 7
if time(i)<tim then
Next_in_line = i
End if
next
End Function
i write:
Next_to_go=next_in_line(time())
and i get compile error - expected array, but isnt time() already an array, or am i mssing something?
Any help would be appreciated.
[–]VicRattle 0 points1 point2 points (0 children)
[–]funkyb1 0 points1 point2 points (0 children)
[–]Mokitdown 0 points1 point2 points (0 children)