+ Reply to Thread
Results 1 to 4 of 4

Print visible sheets - 1 print each

Hybrid View

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    Netherlands
    MS-Off Ver
    2007 on Win 7
    Posts
    50

    Print visible sheets - 1 print each

    Hi all.

    I have the follwoing code in a macro :

    Sub printselected()
        
        Sheets("SELECTIE BLAD").Select
        ActiveWindow.SelectedSheets.Visible = False
        
    Dim ws As Worksheet
    
    For Each ws In Sheets
    
        If ws.Visible Then ws.Select (False)
    
    Next
    
        Application.Dialogs(xlDialogPrinterSetup).Show
        ActiveWindow.SelectedSheets.PrintOut
    
        Sheets("SELECTIE BLAD").Activate
        Sheets("SELECTIE BLAD").Visible = True
        
    End Sub
    If I push the button for this macro the printer prints 7 copies of each sheet.
    How can I tell the printer that I only want 1 copy ?

    I assume in the line where "printout" is mentioned use a code for number of copies ....
    but which code is it ?

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Print visible sheets - 1 print each

    Maybe:
    ActiveWindow.SelectedSheets.PrintOut Copies:=1
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Registered User
    Join Date
    09-10-2014
    Location
    Netherlands
    MS-Off Ver
    2007 on Win 7
    Posts
    50

    Re: Print visible sheets - 1 print each

    Thanks.

    This was the peace of code I missed.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Print visible sheets - 1 print each

    You're welcome!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] vba macros to print first page for visible sheets only
    By hecgroups in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2012, 12:34 PM
  2. Replies: 1
    Last Post: 06-22-2012, 11:53 AM
  3. Print only visible rows and a print to or save as pdf Macro
    By rlebeausw in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-08-2011, 10:08 PM
  4. Print visible sheets excluding certain ones
    By amelio in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-09-2011, 12:17 PM
  5. Print visible sheets
    By smj276 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-21-2007, 10:47 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1