PC Review


Reply
Thread Tools Rate Thread

Choose Printer other than default

 
 
R
Guest
Posts: n/a
 
      16th Nov 2006
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 With Quote
 
 
 
 
papou
Guest
Posts: n/a
 
      16th Nov 2006
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" <(E-Mail Removed)> a écrit dans le message de news:
(E-Mail Removed)...
> 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 With Quote
 
JMay
Guest
Posts: n/a
 
      16th Nov 2006
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed):

> 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" <(E-Mail Removed)> a écrit dans le message de news:
> (E-Mail Removed)...
> > 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 With Quote
 
papou
Guest
Posts: n/a
 
      16th Nov 2006
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" <(E-Mail Removed)> a écrit dans le message de news:
YBZ6h.15646$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed):
>
>> 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" <(E-Mail Removed)> a écrit dans le message de news:
>> (E-Mail Removed)...
>> > 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 With Quote
 
JMay
Guest
Posts: n/a
 
      17th Nov 2006
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" <(E-Mail Removed)> wrote in message
news:ONlH#(E-Mail Removed):

> 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" <(E-Mail Removed)> a écrit dans le message de news:
> YBZ6h.15646$(E-Mail Removed)...
> > 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" <(E-Mail Removed)> wrote in message
> > news:(E-Mail Removed):
> >
> >> 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" <(E-Mail Removed)> a écrit dans le message de news:
> >> (E-Mail Removed)...
> >> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Can't choose default printer Chuck Windows Vista Print / Fax / Scan 0 13th Nov 2009 10:08 AM
printing envelopes, word does not choose default printer =?Utf-8?B?am9lIHNjaG1v?= Microsoft Word Document Management 1 6th Apr 2007 06:03 AM
After the default printer has been changed by code in Access 2003, the application still directs a report to the former default printer. Peanuts Microsoft Access Forms 2 26th Feb 2006 06:32 AM
After the default printer has been changed by code in Access 2003, the application still directs a report to the former default printer. Peanuts Microsoft Access Reports 1 24th Feb 2006 02:34 PM
After the default printer has been changed by code in Access 2003, the application still directs a report to the former default printer. i8mypnuts@yahoo.com Microsoft Access Form Coding 1 24th Feb 2006 01:24 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:26 AM.