VB Code:
  1. Private Sub Form_Load()
  2.    
  3.     Dim myArray() As Single
  4.    
  5.     MsgBox getSize(myArray)
  6.    
  7. End Sub
  8.  
  9. Private Function getSize(inArray() As Variant) As Integer
  10.    
  11.     On Error Resume Next
  12.    
  13.     getSize = 0
  14.    
  15.     getSize = UBound(inArray)
  16.    
  17. End Function
This won't work because the getSize function expects a Variant array.
Apart from a great long list of optional paramaters and loads of ElseIf statements is there any way to write a function that will accept any data type array? Any data type actually.
This really bugs me.