Test for NULL string?
Robert,
I missed the 'invalid' bit but you don't tell us what 'invalid' means. Maybe
you mean a number?
Function Foo(ByVal myData As String)
If myData = vbNullString Or IsNumeric(myData) Then
Foo = "No string passed to function"
Exit Function
End If
' Do stuff
End Function
--
Mike
When competing hypotheses are equal, adopt the hypothesis that introduces
the fewest assumptions while still sufficiently answering the question.
Occam''''s razor (Abbrev)
"Robert Crandal" wrote:
I have the following function:
Function Foo (ByVal myData as String)
' Do stuff
End Foo
My question is, do I need to test if the "myData"
parameter is null or invalid?? How can I best
test the parater if it's valid or null or not??
(so i can avoid any errors)
thankx
.
|