Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check to see if printer was installed

Status
Not open for further replies.

BobWeston

Programmer
Mar 18, 2002
13
US
Hello!
I have a nifty script that adds a network printer.

99% of the time it works. It's that other 1% that I need to program for. Rather than display some ugly system error message, I'd like to gracefully display a message indicating that the printer was not installed and to contact X for more information.

How does one go about doing that?

Thanks,

Bob
 
Take a look at the Err object and at the On Error Resume Next instruction.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
PH,
Thanks for the quick reply. I had tried using 'err' without any luck and then changed to 'Err' per your suggestion and what do ya know, it worked.

Thanks again for the tip!

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top