Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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č |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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č | | | |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Row select mode to highlight active row of active cell | Excel Discussion (Misc queries) | |||
How to set printer default to select active sheet not whole book | Excel Discussion (Misc queries) | |||
members on my network printer not able to print to default printer | Excel Discussion (Misc queries) | |||
Printer Multiple Worksheets with a particular Printer Setting | Excel Worksheet Functions | |||
Resetting the Active Printer | Excel Programming |