I did a little tweaking of Howard's ConvertCOMError() function. It goes a little like this...

code:
fnConvertCOMErr(-2147352567)
@ERROR " : " @SERROR ?

Function fnConvertCOMErr($sErr)
If $sErr<0 $sErr=VAL("&"+Right(DecToHex($sErr),4)) EndIf
Exit $sErr
Endfunction

The benefit is that the error code is now converted for the @ERROR and @SERROR macro without having to resort to "net helpmsg" which isn't available on all operating systems.

[ 19. March 2003, 18:39: Message edited by: Chris S. ]