%REM Function LSCDbl Description: wrapper to covert to Double, returns 0 for error %END REM Function LSCDbl(numTxt As String) As Long On Error GoTo FErrorHandler If (numTxt = "") Then LSCDbl = 0 Exit Function End If ' convert LSCDbl = CDbl(numTxt) FExit: Exit Function FErrorHandler: Print |(LSCDbl) Unexpected error, expected incoming string "| & numTxt & |" to be a number. Error: | & Cstr(Err) & ", line: " & Cstr(Erl) & ", error: " & Error$ & "." LSCLng = 0 Resume FExit End Function