Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
members on my network printer not able to print to default printer | Excel Discussion (Misc queries) | |||
Default Printer | Excel Programming | |||
Choose a printer | Excel Programming | |||
Help with macro to choose printer | New Users to Excel | |||
default printer | Excel Programming |