+ Reply to Thread
Results 1 to 4 of 4

Help with Print Macro

  1. #1
    Forum Contributor
    Join Date
    09-11-2012
    Location
    minot, north dakota
    MS-Off Ver
    Excel 2010
    Posts
    118

    Help with Print Macro

    I am looking for help with this print macro to be modified. It currently prints all active tabs but I need it to Print tables 1-3 and last active tab. there will be additional tabs added so I don't want it to print tables 4-... but does include the final active tab.
    Any help making this happen would be great. Here is the macro that I am currently using which is great but need t be adjusted to exclude the sheets descried above.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Help with Print Macro

    Not sure what you mean by "last active sheet", but maybe this works:

    Please Login or Register  to view this content.
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor
    Join Date
    09-11-2012
    Location
    minot, north dakota
    MS-Off Ver
    Excel 2010
    Posts
    118

    Re: Help with Print Macro

    The last sheet constantly changes from 1-62 with the first PDF having sheet 1-3 and the final sheet "1"
    then the next time its PDF same first 1-3 sheets and then final sheet "2" and so on. Sheet "1" is still active when PDF for sheet "2" is made.

    The first part looks good but final sheet never has the same name.

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,447

    Re: Help with Print Macro

    The code selects the worksheets named Sheet1, Sheet2 and Sheet3 (always). The Sheets(Sheets.Count).Name will select the last sheet in the workbook, regardless of what it is called.

    Change the sheet names as required apart from the last one.

    Your description seems somewhat generic and I am unable to offer a specific solution based on the information you have provided.

+ 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] Macro to open Print Preview & Print from Quick Access Toolbar
    By fastcar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-12-2017, 04:58 PM
  2. Macro slows down when I print/print preview/page break a sheet
    By Grug in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-07-2015, 08:59 PM
  3. Disabled print toolbar and menu but Print Macro button cannot print also...
    By zein97 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2014, 01:42 PM
  4. Print Macro errors on final print command. Run-time error '1004':
    By Steverizer in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2013, 06:41 PM
  5. [SOLVED] Pivot Table macro to set print area and print details of drill down data
    By Steve Haskins in forum Excel General
    Replies: 2
    Last Post: 12-28-2005, 01:10 PM
  6. Create a print macro that would automatically select print area?
    By Ron de Bruin in forum Excel Formulas & Functions
    Replies: 14
    Last Post: 09-06-2005, 06:05 AM
  7. Create a print macro that would automatically select print area?
    By wastedwings in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 03:05 AM

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