Results 1 to 2 of 2

Thread: quick printing question

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2003
    Location
    Durham,NC
    Posts
    12

    quick printing question

    I have the following code for a command button to print specific pages in my workbook. What code do I need to put in there to make it so that it will let me choose from my available printer and choose the number of copies that I need.

    Right now it just auto prints to my default printer and prints one copy.

    Here is the code:
    Private Sub CommandButton12_Click()
    Sheets(Array("Quote Page 1", "QP2", "QP3", "QP4", "QP5", "QP6")).Select
    Sheets("Quote Page 1").Activate
    ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    Sheets("DIR").Select
    End Sub

    Thanks for any help!!!
    Kimberly

  2. #2
    Hyperactive Member Daskalos's Avatar
    Join Date
    Jun 2002
    Location
    Just behind YOU...
    Posts
    364
    Add a commandDialog and try this:

    VB Code:
    1. Private Sub CommandButton12_Click()
    2. CommonDialog1.ShowPrinter
    3. Sheets(Array("Quote Page 1", "QP2", "QP3", "QP4", "QP5", "QP6")).Select
    4. Sheets("Quote Page 1").Activate
    5. ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
    6. Sheets("DIR").Select
    7. End Sub

    Hope it helps
    [vbcode]Dim Daskalos As NewBie
    If My.english = Wrong Then
    Forgive My.Poor.English
    End If[/vbcode]
    Ða§kalø§
    ICQ#: 36146307
    Current ICQ status:
    More ways to contact me

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width