I am using Vb6.
I want to write a function to replace 'null' to '0'.
I did this:
Then, I call it like thisCode:Public Function sysNulltoZero(ByVal strText As String) As integer if strText = Null then sysNulltoZero = 0 end if End Function
But i got an errormsg:invalid use null.Code:SmallCurrencyCharge = Format(sysNulltoZero(rcsCOC("Coc_SmallCurrencyRate")), "000.0000")
Can someone help me out? Thanks a lot.




Reply With Quote