F
fergusor
Can anyone help. I'm trying to get a year returned from a function bu
it keeps coming back empty.
I'm calling it, sending a string... in this case '2004'
Call messageYearResponse(yearResponse)
Then the function is supposed to return xYear as 2004... instead it'
coming back empty.
Private Function messageYearResponse(ByVal yearResponse As String)
Dim xYear
If yearResponse = "" Then
Exit Function
Else
If IsNumeric(yearResponse) Then
xYear = CInt(yearResponse)
Else
msgbox ("Must be numeric"), vbOKOnly
Resume
End If
End If
End Functio
it keeps coming back empty.
I'm calling it, sending a string... in this case '2004'
Call messageYearResponse(yearResponse)
Then the function is supposed to return xYear as 2004... instead it'
coming back empty.
Private Function messageYearResponse(ByVal yearResponse As String)
Dim xYear
If yearResponse = "" Then
Exit Function
Else
If IsNumeric(yearResponse) Then
xYear = CInt(yearResponse)
Else
msgbox ("Must be numeric"), vbOKOnly
Resume
End If
End If
End Functio