Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 504
Default Detecting a printer is connected

Hi there,

I have a macro that prints a form but errors if no printer is attached. What
would the vba code be for detecting a printer and ending the sub if one is
not conected

many thanks.

kevin.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Detecting a printer is connected

Try this

Untested but try this

If Application.ActivePrinter = "" Then Exit Sub


--
Regards Ron de Bruin
http://www.rondebruin.nl



"kevin" wrote in message ...
Hi there,

I have a macro that prints a form but errors if no printer is attached. What
would the vba code be for detecting a printer and ending the sub if one is
not conected

many thanks.

kevin.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Print Range not connected Tami Excel Worksheet Functions 1 December 11th 09 11:28 PM
Connected from Excel to Access Damil4real Excel Discussion (Misc queries) 3 September 15th 08 06:10 PM
members on my network printer not able to print to default printer smeheut Excel Discussion (Misc queries) 0 June 18th 07 06:42 PM
hangs when connected Gerhard Adendorff Excel Discussion (Misc queries) 0 April 13th 07 06:56 AM
Printer Multiple Worksheets with a particular Printer Setting PP[_2_] Excel Worksheet Functions 0 March 14th 07 02:02 PM


All times are GMT +1. The time now is 07:02 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"