Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default 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
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
Row select mode to highlight active row of active cell Bart Fay[_2_] Excel Discussion (Misc queries) 0 May 11th 10 09:34 PM
How to set printer default to select active sheet not whole book Vic Storey Excel Discussion (Misc queries) 0 May 16th 08 06:11 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
Printer Multiple Worksheets with a particular Printer Setting PP[_2_] Excel Worksheet Functions 0 March 14th 07 02:02 PM
Resetting the Active Printer Sue[_5_] Excel Programming 1 January 15th 04 01:20 AM


All times are GMT +1. The time now is 01:01 AM.

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

About Us

"It's about Microsoft Excel"