Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
My bad....
I was just looking for instances in which "no string" or a NULL value is passed to the function. I'm thinking that the "If myData = vbNullString" will be sufficient enough. BTW, I'm a long time C++ programmer, so I developed a habit of doing a lot of NULL error testing. VBA seems to be more "type safe" when it comes to null strings, so I kinda get the impression that I don't need to always check for NULL strings, but I still wanted to know how to do it anyways. Thanks for the info. "Mike H" wrote in message ... 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 -- |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to test for imported Access table null cell? | Excel Worksheet Functions | |||
Test for null - insert a row if isnull | Excel Discussion (Misc queries) | |||
String concatenation having null character | Excel Programming | |||
Function returning null value instead of string value | Excel Programming | |||
Replace null string with blank cell | Excel Discussion (Misc queries) |