Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 276
Default Default Printer

Currently i have:
If Range("AC1").Value = 39 Then
Application.ActivePrinter = "\\OFFICE3\OKI C5200n on Ne02:"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=5, Copies:=1, _
ActivePrinter:="\\OFFICE3\OKI C5200n on Ne02:"


How can i generalise this to print the requested pages to what ever the default printer on the PC is set to???

Like:

If Range("AC1").Value = 39 Then
Application.ActivePrinter = "DEFAULT PRINTER"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=5, Copies:=1, _
ActivePrinter:="DEFAULT PRINTER"



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Default Printer

Hi Corey

All you need to do is remove the lines / sections talking about the active
printer - ie

If Range("AC1").Value = 39 Then ActiveWindow.SelectedSheets.PrintOut
From:=1, To:=5, Copies:=1

will do what you want.

HTH

David

"Corey" wrote in message
...
Currently i have:
If Range("AC1").Value = 39 Then
Application.ActivePrinter = "\\OFFICE3\OKI C5200n on Ne02:"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=5, Copies:=1, _
ActivePrinter:="\\OFFICE3\OKI C5200n on Ne02:"


How can i generalise this to print the requested pages to what ever the
default printer on the PC is set to???

Like:

If Range("AC1").Value = 39 Then
Application.ActivePrinter = "DEFAULT PRINTER"
ActiveWindow.SelectedSheets.PrintOut From:=1, To:=5, Copies:=1, _
ActivePrinter:="DEFAULT PRINTER"


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
Default Printer aftamath77 Excel Discussion (Misc queries) 2 November 26th 08 05:37 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
Default Printer carlito_1985 Excel Programming 1 June 27th 05 08:27 AM
Default printer peterG Excel Programming 2 January 15th 04 06:06 PM
default printer solo_razor[_21_] Excel Programming 1 October 30th 03 03:22 PM


All times are GMT +1. The time now is 11:10 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"