Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default User select printer in print macro


maybe this will help, say there was a choice of 2 printers, and you have
a check box to select which printer to print from


Code:
--------------------

'deterime which printer to print from
If Range("A1") = true then myprinterselect = "\\BTBEAPAPP04\PBTBEA001M"
If Range("A2") = true then myprinterselect = "\\BTBEAPAPP04\PBTBEA002M"


Dim sCurrentPrinter As String
sCurrentPrinter = ActivePrinter
wrd.ActivePrinter = my printer select


--------------------


works for me anyway, good luck :)


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=530690

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default User select printer in print macro

Great idea, very clever...that will work for the onsite folks. The problem
is that we are going to be sending to offsite people and I have no idea what
their printers are. :-(

"rocket0612" wrote:


maybe this will help, say there was a choice of 2 printers, and you have
a check box to select which printer to print from


Code:
--------------------

'deterime which printer to print from
If Range("A1") = true then myprinterselect = "\\BTBEAPAPP04\PBTBEA001M"
If Range("A2") = true then myprinterselect = "\\BTBEAPAPP04\PBTBEA002M"


Dim sCurrentPrinter As String
sCurrentPrinter = ActivePrinter
wrd.ActivePrinter = my printer select


--------------------


works for me anyway, good luck :)


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=530690


  #3   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default User select printer in print macro

I think I used the printersetup dialog box in a project to allow users to
change the printer. I had a command button on the form that ran code like
this

Application.Dialogs(xlDialogPrinterSetup).Show

Then I put the activeprinter.name into a label that was on my form so users
knew what the active printer was. The code to print the worksheets was
attached to another command button.

Hope this helps.


"sarah_tennessee" wrote:

Great idea, very clever...that will work for the onsite folks. The problem
is that we are going to be sending to offsite people and I have no idea what
their printers are. :-(

"rocket0612" wrote:


maybe this will help, say there was a choice of 2 printers, and you have
a check box to select which printer to print from


Code:
--------------------

'deterime which printer to print from
If Range("A1") = true then myprinterselect = "\\BTBEAPAPP04\PBTBEA001M"
If Range("A2") = true then myprinterselect = "\\BTBEAPAPP04\PBTBEA002M"


Dim sCurrentPrinter As String
sCurrentPrinter = ActivePrinter
wrd.ActivePrinter = my printer select


--------------------


works for me anyway, good luck :)


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=530690


  #4   Report Post  
Posted to microsoft.public.excel.programming
JMB JMB is offline
external usenet poster
 
Posts: 2,062
Default User select printer in print macro

Two other links posted by Norman Jones and Steve Yandl

http://word.mvps.org/FAQs/MacrosVBA/...lePrinters.htm
http://tinyurl.com/9cm7l


"sarah_tennessee" wrote:

Great idea, very clever...that will work for the onsite folks. The problem
is that we are going to be sending to offsite people and I have no idea what
their printers are. :-(

"rocket0612" wrote:


maybe this will help, say there was a choice of 2 printers, and you have
a check box to select which printer to print from


Code:
--------------------

'deterime which printer to print from
If Range("A1") = true then myprinterselect = "\\BTBEAPAPP04\PBTBEA001M"
If Range("A2") = true then myprinterselect = "\\BTBEAPAPP04\PBTBEA002M"


Dim sCurrentPrinter As String
sCurrentPrinter = ActivePrinter
wrd.ActivePrinter = my printer select


--------------------


works for me anyway, good luck :)


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...o&userid=19492
View this thread: http://www.excelforum.com/showthread...hreadid=530690


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default User select printer in print macro

Dim sh as Worksheet
set sh = Activesheet
If CheckBox1.Value = True Then
Sheets(Array("Total Summary", "VZ Total Summary")).Select
application.Dialogs(xlDialogPrinterSetup).Show
ActiveWindow.SelectedSheets.Print
End if
sh.Select

--
Regards,
Tom Ogilvy

"sarah_tennessee" wrote in
message ...
Great idea, very clever...that will work for the onsite folks. The

problem
is that we are going to be sending to offsite people and I have no idea

what
their printers are. :-(

"rocket0612" wrote:


maybe this will help, say there was a choice of 2 printers, and you have
a check box to select which printer to print from


Code:
--------------------

'deterime which printer to print from
If Range("A1") = true then myprinterselect =

"\\BTBEAPAPP04\PBTBEA001M"
If Range("A2") = true then myprinterselect =

"\\BTBEAPAPP04\PBTBEA002M"


Dim sCurrentPrinter As String
sCurrentPrinter = ActivePrinter
wrd.ActivePrinter = my printer select


--------------------


works for me anyway, good luck :)


--
rocket0612
------------------------------------------------------------------------
rocket0612's Profile:

http://www.excelforum.com/member.php...o&userid=19492
View this thread:

http://www.excelforum.com/showthread...hreadid=530690






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default User select printer in print macro

This should be just what you want. It also restores the users default
printer after printing.

strOldActivePrinter = Application.ActivePrinter
Application.Dialogs(9).Show
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Application.ActivePrinter = strOldActivePrinter

Lee

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
select printer macro jatman Excel Worksheet Functions 1 March 15th 08 01:58 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
create a pause in print macro to allow user to select printer Scott53 Excel Programming 1 September 7th 05 04:29 PM
How do I initiate the windows printer select object in Excel macro Mick B[_2_] Excel Programming 1 January 13th 05 09:46 PM
My First User Form - How to Select Range(s) and Print Bruce Roberson[_2_] Excel Programming 3 July 25th 03 03:09 AM


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