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

Thanks for all of your previous help.

I have a short question. Wrote this sub and it's working fine. Though,
it's using default printer. Any chance that I can offer a list of
installed printers to choose from? Thanks for your answer.

Regards,

Rico

Sub PrintSheets()

ThisWorkbook.Worksheets("Name01").PrintOut Copies:=1, Collate:=True
ThisWorkbook.Worksheets("Name02").PrintOut Copies:=1, Collate:=True

End Sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Choose Printer other than default

Hello Rico
If Application.Dialogs(xlDialogPrinterSetup).Show < False Then
PrinterSelected = Application.ActivePrinter
With ThisWorkbook
..Worksheets("Name01").PrintOut Copies:=1, ActivePrinter:=PrinterSelected,
Collate:=True
..Worksheets("Name02").PrintOut Copies:=1, ActivePrinter:=PrinterSelected,
Collate:=True
End With
Else: MsgBox "Printer selection has been Cancelled", vbInformation,
"Cancelled"
End If

HTH
Cordially
Pascal

"ricowyder" a écrit dans le message de news:
...
Thanks for all of your previous help.

I have a short question. Wrote this sub and it's working fine. Though,
it's using default printer. Any chance that I can offer a list of
installed printers to choose from? Thanks for your answer.

Regards,

Rico

Sub PrintSheets()

ThisWorkbook.Worksheets("Name01").PrintOut Copies:=1, Collate:=True
ThisWorkbook.Worksheets("Name02").PrintOut Copies:=1, Collate:=True

End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default Choose Printer other than default

Papou,
Does the 1st line (below) say.. If the PrinterSetup Dialog Box is
Currently "On-Screen" (showing) - Whatever Printer is currently Selected
or Highlighted will be used in the printing of Worksheets Name01 and
Name02?

Thanks in advance,

If Application.Dialogs(xlDialogPrinterSetup).Show < False Then
PrinterSelected = Application.ActivePrinter

"papou" wrote in message
:

Hello Rico
If Application.Dialogs(xlDialogPrinterSetup).Show < False Then
PrinterSelected = Application.ActivePrinter
With ThisWorkbook
.Worksheets("Name01").PrintOut Copies:=1, ActivePrinter:=PrinterSelected,
Collate:=True
.Worksheets("Name02").PrintOut Copies:=1, ActivePrinter:=PrinterSelected,
Collate:=True
End With
Else: MsgBox "Printer selection has been Cancelled", vbInformation,
"Cancelled"
End If

HTH
Cordially
Pascal

"ricowyder" a écrit dans le message de news:
...
Thanks for all of your previous help.

I have a short question. Wrote this sub and it's working fine. Though,
it's using default printer. Any chance that I can offer a list of
installed printers to choose from? Thanks for your answer.

Regards,

Rico

Sub PrintSheets()

ThisWorkbook.Worksheets("Name01").PrintOut Copies:=1, Collate:=True
ThisWorkbook.Worksheets("Name02").PrintOut Copies:=1, Collate:=True

End Sub


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 110
Default Choose Printer other than default

No, this only tests if no selection has been made from the list (cancelled
button clicked), in which case it will return False.

HTH
Cordially
Pascal

"JMay" a écrit dans le message de news:
...
Papou,
Does the 1st line (below) say.. If the PrinterSetup Dialog Box is
Currently "On-Screen" (showing) - Whatever Printer is currently Selected
or Highlighted will be used in the printing of Worksheets Name01 and
Name02?

Thanks in advance,

If Application.Dialogs(xlDialogPrinterSetup).Show < False Then
PrinterSelected = Application.ActivePrinter

"papou" wrote in message
:

Hello Rico
If Application.Dialogs(xlDialogPrinterSetup).Show < False Then
PrinterSelected = Application.ActivePrinter
With ThisWorkbook
.Worksheets("Name01").PrintOut Copies:=1, ActivePrinter:=PrinterSelected,
Collate:=True
.Worksheets("Name02").PrintOut Copies:=1, ActivePrinter:=PrinterSelected,
Collate:=True
End With
Else: MsgBox "Printer selection has been Cancelled", vbInformation,
"Cancelled"
End If

HTH
Cordially
Pascal

"ricowyder" a écrit dans le message de news:
...
Thanks for all of your previous help.

I have a short question. Wrote this sub and it's working fine. Though,
it's using default printer. Any chance that I can offer a list of
installed printers to choose from? Thanks for your answer.

Regards,

Rico

Sub PrintSheets()

ThisWorkbook.Worksheets("Name01").PrintOut Copies:=1, Collate:=True
ThisWorkbook.Worksheets("Name02").PrintOut Copies:=1, Collate:=True

End Sub




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 422
Default Choose Printer other than default

Papou, Could I ask you one more q ?

I'm seriousy trying to understand code so here's my problem in reading
the below 2 lines:

As I read it I understand it to say:

First I see the .Show method which (in the User Form environment) says
SHOW the form,, So I see If the Dialogbox Printer Setup.Show = TRUE
(< False)
Then Whatever the Current Active Printer IS assign it to the Variable
PrinterSelected.

Thanks in Advance;



If Application.Dialogs(xlDialogPrinterSetup).Show < False Then
PrinterSelected = Application.ActivePrinter

"papou" wrote in message
:

No, this only tests if no selection has been made from the list (cancelled
button clicked), in which case it will return False.

HTH
Cordially
Pascal

"JMay" a écrit dans le message de news:
...
Papou,
Does the 1st line (below) say.. If the PrinterSetup Dialog Box is
Currently "On-Screen" (showing) - Whatever Printer is currently Selected
or Highlighted will be used in the printing of Worksheets Name01 and
Name02?

Thanks in advance,

If Application.Dialogs(xlDialogPrinterSetup).Show < False Then
PrinterSelected = Application.ActivePrinter

"papou" wrote in message
:

Hello Rico
If Application.Dialogs(xlDialogPrinterSetup).Show < False Then
PrinterSelected = Application.ActivePrinter
With ThisWorkbook
.Worksheets("Name01").PrintOut Copies:=1, ActivePrinter:=PrinterSelected,
Collate:=True
.Worksheets("Name02").PrintOut Copies:=1, ActivePrinter:=PrinterSelected,
Collate:=True
End With
Else: MsgBox "Printer selection has been Cancelled", vbInformation,
"Cancelled"
End If

HTH
Cordially
Pascal

"ricowyder" a écrit dans le message de news:
...
Thanks for all of your previous help.

I have a short question. Wrote this sub and it's working fine. Though,
it's using default printer. Any chance that I can offer a list of
installed printers to choose from? Thanks for your answer.

Regards,

Rico

Sub PrintSheets()

ThisWorkbook.Worksheets("Name01").PrintOut Copies:=1, Collate:=True
ThisWorkbook.Worksheets("Name02").PrintOut Copies:=1, Collate:=True

End Sub



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
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
Choose a printer Alvin Hansen[_2_] Excel Programming 4 March 13th 05 01:32 PM
Help with macro to choose printer Wind54Surfer New Users to Excel 2 December 21st 04 12:09 AM
default printer solo_razor[_21_] Excel Programming 1 October 30th 03 03:22 PM


All times are GMT +1. The time now is 11:53 PM.

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

About Us

"It's about Microsoft Excel"