J
jer99 via AccessMonster.com
I've read through the messages here and have tried a number of things.
Still can't get this to work.
Here's the two sub/functions:
Function LastValue(sArray() As String) As Integer
Dim iTempCount As Integer
For iTempCount = 0 To UBound(sArray)
If iTempCount = "" Then
Exit For
End If
Next
If iTempCount <> UBound(sArray) Then
LastValue = iTempCount - 1
Else
LastValue = iTempCount
End If
End Function
sub testit()
Dim aTemp(10) As String
aTemp(0) = "0"
aTemp(1) = "one"
Debug.Print LastValue(aTemp) <<<<<<<<--------------------Problem
End Function
I can't understand why I keep getting an error message saying it's looking
for an Array to be passed.
Anyone?
Still can't get this to work.
Here's the two sub/functions:
Function LastValue(sArray() As String) As Integer
Dim iTempCount As Integer
For iTempCount = 0 To UBound(sArray)
If iTempCount = "" Then
Exit For
End If
Next
If iTempCount <> UBound(sArray) Then
LastValue = iTempCount - 1
Else
LastValue = iTempCount
End If
End Function
sub testit()
Dim aTemp(10) As String
aTemp(0) = "0"
aTemp(1) = "one"
Debug.Print LastValue(aTemp) <<<<<<<<--------------------Problem
End Function
I can't understand why I keep getting an error message saying it's looking
for an Array to be passed.
Anyone?