damn, if this all about golf:
code:
Function fnConvertCOMErr($sErr)
Exit Iif($sErr<0,VAL("&"+Right(DecToHex($sErr),4)),0)
Endfunction

is 93 and in hungarian notation

proper golf score would be with:
code:
Function fnConvertCOMErr($)
Exit Iif($<0,VAL("&"+Right(DecToHex($),4)),0)
Endfunction

and score 81 [Big Grin]
_________________________
!

download KiXnet