M
MackS
Hi
I have a VB6 routine which i have been using it in many of my VB6 projects.
I am trying to upgrade/convert VB6 project and see no of getting a function
similar to this:
-----------
Public Function ChkNull(varValue As Variant, Optional varValueIfNull As
Variant) As Variant
'This function is used to remove a null from a key
If IsNull(varValue) Then
If Not IsMissing(varValueIfNull) Then
ChkNull = varValueIfNull
Else
ChkNull = ""
End If
Else
ChkNull = varValue
End If
End Function
-----------------------------
In VS 2005, Variant data type is not supported and I am asked to use Object
instead. But, Object doesn't have .IsNullOrEmpty() method.
Any help, pls
TIA
Mack
I have a VB6 routine which i have been using it in many of my VB6 projects.
I am trying to upgrade/convert VB6 project and see no of getting a function
similar to this:
-----------
Public Function ChkNull(varValue As Variant, Optional varValueIfNull As
Variant) As Variant
'This function is used to remove a null from a key
If IsNull(varValue) Then
If Not IsMissing(varValueIfNull) Then
ChkNull = varValueIfNull
Else
ChkNull = ""
End If
Else
ChkNull = varValue
End If
End Function
-----------------------------
In VS 2005, Variant data type is not supported and I am asked to use Object
instead. But, Object doesn't have .IsNullOrEmpty() method.
Any help, pls
TIA
Mack