You could do something like this.
It shows the error code and the error text. The sleep 2 is just there so you can actually see what is displayed on your screen.

 Code:
AddPrinterConnection ("\\PYE511\SHIP33")
?@ERROR
?@SERROR
Sleep 2

AddPrinterConnection ("\\PYE511\SHIP37") 
?@ERROR
?@SERROR
Sleep 2

AddPrinterConnection ("\\PYE511\SHIP45")
?@ERROR
?@SERROR
Sleep 2
_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.