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

Greetings,

I need to have a form printed on the same printer regardless of which
work station is trying to print it. I have 5 work stations in my LAN
each with it's own printer. Only one of these printers can print the
entire form and the print process is initiated by CommandButton1 on
sheet1 at any of the 5 work stations.

Does anyone know how to get VBA to select the correct printer when
this button is clicked?

Any help would be appreciated.

TIA

-Minitman
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Selecting A Printer With VBA

I got something like this when I recorded a macro to select a printer:

ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Symantec Fax Starter Edition on Ne00:", Collate:=True
Mike F
"Minitman" wrote in message
...
Greetings,

I need to have a form printed on the same printer regardless of which
work station is trying to print it. I have 5 work stations in my LAN
each with it's own printer. Only one of these printers can print the
entire form and the print process is initiated by CommandButton1 on
sheet1 at any of the 5 work stations.

Does anyone know how to get VBA to select the correct printer when
this button is clicked?

Any help would be appreciated.

TIA

-Minitman



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 134
Default Selecting A Printer With VBA

hi
this is from my network. i don't know how your's is set up
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:= _
"\\OKI-01\OKI-HP4000-01 on Ne01:", Collate:=True
regards
Frank

-----Original Message-----
Greetings,

I need to have a form printed on the same printer

regardless of which
work station is trying to print it. I have 5 work

stations in my LAN
each with it's own printer. Only one of these printers

can print the
entire form and the print process is initiated by

CommandButton1 on
sheet1 at any of the 5 work stations.

Does anyone know how to get VBA to select the correct

printer when
this button is clicked?

Any help would be appreciated.

TIA

-Minitman
.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default Selecting A Printer With VBA - Answered

Hey Mike and Frank,

Thanks for the replies, however your solutions were to specific to
your machines, but they did show me a different direction to take.

It turns out the simple answer is to use the macro recorder and just
setup the printer I needed from a work station that was not connected
to it. This gave me the following command, address and printer name
with syntax:

Application.ActivePrinter = "\\BLIND\hp deskjet 5100 series on Ne01:"

Again, thanks.

-Minitman


On Thu, 21 Oct 2004 05:03:56 -0700, "Frank Stone"
wrote:

hi
this is from my network. i don't know how your's is set up
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:= _
"\\OKI-01\OKI-HP4000-01 on Ne01:", Collate:=True
regards
Frank

-----Original Message-----
Greetings,

I need to have a form printed on the same printer

regardless of which
work station is trying to print it. I have 5 work

stations in my LAN
each with it's own printer. Only one of these printers

can print the
entire form and the print process is initiated by

CommandButton1 on
sheet1 at any of the 5 work stations.

Does anyone know how to get VBA to select the correct

printer when
this button is clicked?

Any help would be appreciated.

TIA

-Minitman
.


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Selecting A Printer With VBA - Answered

Or on a workstation that was connected, you could go to the immediate window
in the VBE and do

? Application.ActivePrinter

--
Regards,
Tom Ogilvy

"Minitman" wrote in message
...
Hey Mike and Frank,

Thanks for the replies, however your solutions were to specific to
your machines, but they did show me a different direction to take.

It turns out the simple answer is to use the macro recorder and just
setup the printer I needed from a work station that was not connected
to it. This gave me the following command, address and printer name
with syntax:

Application.ActivePrinter = "\\BLIND\hp deskjet 5100 series on Ne01:"

Again, thanks.

-Minitman


On Thu, 21 Oct 2004 05:03:56 -0700, "Frank Stone"
wrote:

hi
this is from my network. i don't know how your's is set up
ActiveWindow.SelectedSheets.PrintOut Copies:=1,
ActivePrinter:= _
"\\OKI-01\OKI-HP4000-01 on Ne01:", Collate:=True
regards
Frank

-----Original Message-----
Greetings,

I need to have a form printed on the same printer

regardless of which
work station is trying to print it. I have 5 work

stations in my LAN
each with it's own printer. Only one of these printers

can print the
entire form and the print process is initiated by

CommandButton1 on
sheet1 at any of the 5 work stations.

Does anyone know how to get VBA to select the correct

printer when
this button is clicked?

Any help would be appreciated.

TIA

-Minitman
.




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
Selecting printer in a macro lohme Excel Discussion (Misc queries) 4 January 2nd 07 06:36 PM
printing out via vb and selecting the printer HCS Excel Programming 1 October 19th 04 06:04 PM
Selecting printer from macro BrianG[_4_] Excel Programming 5 June 9th 04 10:43 PM
Selecting a printer Robin Clay[_3_] Excel Programming 0 February 2nd 04 06:25 PM
Selecting a Printer in VBA Robin Clay[_3_] Excel Programming 3 January 28th 04 01:13 AM


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