![]() |
Active printer
Hi,
I have trouble with deteremine fax printer on network. My code is : Application.ActivePrinter ="\\server\Fax on Ne03" Problem is that from time to time my fax printer chnage in to ="\\server\Fax on Ne06" or ="\\server\Fax on Nexx" Printer has been shared and the share name is "FAX" But when I wrote : Application.ActivePrinter ="FAX" I got error : Run-tem error '1004' Method ' ActivePrinter' of object '_Appliction' failed. Please help. Marijan Glavač |
Active printer
You have to trap the error and try again. an example:
Sub SetFax() On Error Resume Next Err.Clear Application.ActivePrinter = "\\server\Fax on Ne03" If Err.Number < 0 Then Err.Clear Application.ActivePrinter = "\\server\Fax on Ne06" If Err.Number < 0 Then Err.Clear Application.ActivePrinter = "\\server\Fax on NeXX" If Err.Number < 0 Then MsgBox "Cannot set FAX" End If End If End Sub -- Jim Rech Excel MVP "Marijan Glavac" wrote in message ... | Hi, | | I have trouble with deteremine fax printer on network. | My code is : | Application.ActivePrinter ="\\server\Fax on Ne03" | Problem is that from time to time my fax printer chnage in to ="\\server\Fax | on Ne06" or ="\\server\Fax on Nexx" | Printer has been shared and the share name is "FAX" | But when I wrote : | Application.ActivePrinter ="FAX" | I got error : | Run-tem error '1004' | Method ' ActivePrinter' of object '_Appliction' failed. | | Please help. | | Marijan Glavač | | | |
All times are GMT +1. The time now is 04:12 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com