+ Reply to Thread
Results 1 to 2 of 2

How to create a print button for multiple pages with variant ranges?

  1. #1
    Registered User
    Join Date
    01-12-2015
    Location
    Seattle, WA, USA
    MS-Off Ver
    2013
    Posts
    19

    Post How to create a print button for multiple pages with variant ranges?

    I am currently working on creating a button to printPreview a specified range. I've managed to create the print preview button for that specific range on one sheet, but now i'm stuck on creating that print preview for multiple sheets to be eventually printed in one printing.

    Looking forward to the expert community for help on this one.

    Very much appreciated in advance!

    Here is my current code:

    Sub AccountingPrintArea()

    Dim vgw As Worksheet
    Set vgw = ThisWorkbook.Worksheets("SPECS")


    vgwLR = vgw.Cells(Rows.Count, 1).End(xlUp).Row
    vgwLC = vgw.Cells(1, Columns.Count).End(xlToLeft).Column

    'set the print area

    Set PrintA = Sheets("SPECS").Range("a1:s26")
    Sheets("GROUNDWORK").Range ("a1:s19")



    vgw.PageSetup.PrintArea = PrintA.Address(0, 0)

    vgw.PrintPreview


    End Sub

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,482

    Re: How to create a print button for multiple pages with variant ranges?

    Please Login or Register  to view this content.
    http://www.davesexcel.com/rangeselectioncodes.htm

+ 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] Print multiple pages with different name.
    By Annepaws in forum Excel General
    Replies: 2
    Last Post: 06-20-2014, 02:08 PM
  2. [SOLVED] Print only current page! Not all 47 pages when print button is pressed?
    By Margate in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-11-2013, 10:06 AM
  3. Need to autosum ranges of cells within multiple pages and then sum those as well.
    By nightbiscuit in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 03-22-2013, 05:46 PM
  4. Macro to automagically create a Banner Header with multiple pages to Print
    By iFaris in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-13-2012, 01:01 AM
  5. [SOLVED] Create command button to print multiple worksheets in a excel file
    By MarcoR in forum Excel General
    Replies: 3
    Last Post: 06-26-2006, 02:10 PM

Tags for this Thread

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