I am using Vb6.
I want to write a function to replace 'null' to '0'.
I did this:
Code:
Public Function sysNulltoZero(ByVal strText As String) As integer

  if strText = Null then
     sysNulltoZero = 0 
  end if

End Function
Then, I call it like this
Code:
   SmallCurrencyCharge = Format(sysNulltoZero(rcsCOC("Coc_SmallCurrencyRate")), "000.0000")
But i got an errormsg:invalid use null.

Can someone help me out? Thanks a lot.