+ Reply to Thread
Results 1 to 7 of 7

Printing multiple Sheets based on a cell value within the sheet

  1. #1
    Registered User
    Join Date
    02-08-2018
    Location
    BC, Canada
    MS-Off Ver
    Excel 2013
    Posts
    3

    Printing multiple Sheets based on a cell value within the sheet

    I have a large workbook 100+ sheets and I'm looking to create a print button that only prints the sheets that have a certain value in cell "N1" in the worksheet, in this case "A".

    I'm stuck and your advice would be much appreciated. (I'm still a newbie with VBA so go easy on me please if I'm way off)

    This is what I have so far but not working:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Printing multiple Sheets based on a cell value within the sheet

    See if this will do it.

    Please Login or Register  to view this content.
    Any code provided by me should be tested on a copy or a mock up of your original data before applying it to the original. Some events in VBA cannot be reversed with the undo facility in Excel. If your original post is satisfied, please mark the thread as "Solved". To upload a file, see the banner at top of this page.
    Just when I think I am smart, I learn something new!

  3. #3
    Registered User
    Join Date
    02-08-2018
    Location
    BC, Canada
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Printing multiple Sheets based on a cell value within the sheet

    Thanks for trying but.. Still getting a Run-Time Error. "Object doesn't support this property or method"

  4. #4
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Printing multiple Sheets based on a cell value within the sheet

    You forgot about the "Worksheets" collection:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    02-08-2018
    Location
    BC, Canada
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: Printing multiple Sheets based on a cell value within the sheet

    Yes. That did it, Thank you! They are printing, however, I still get a Run-Time error '13' after it runs. Ideas?

  6. #6
    Forum Expert
    Join Date
    10-06-2017
    Location
    drevni ruchadlo
    MS-Off Ver
    old
    Posts
    2,151

    Re: Printing multiple Sheets based on a cell value within the sheet

    Look here:

    https://msdn.microsoft.com/en-us/vba...match-error-13

    and/or give us information about the line of code that generates the error.

  7. #7
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Printing multiple Sheets based on a cell value within the sheet

    this should run OK
    Please Login or Register  to view this content.
    the error was being caused by the comma that followed 'PrintOut'. VBA was expecting a different parameter for that position.

+ 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 code for Multiple sheets printing based on cell name
    By rajeshn_in in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-29-2016, 10:20 PM
  2. trying to move data from master sheet to multiple tag sheets for printing
    By steve400243 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-03-2016, 05:45 PM
  3. Printing sheets based on activity in a cell
    By enwoznick in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-10-2016, 09:09 PM
  4. Pull data from multiple sheets based on cell in Main sheet
    By cpyter in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-29-2014, 01:19 PM
  5. Replies: 0
    Last Post: 03-27-2012, 04:54 PM
  6. Printing Multiple Sheets AND a range from within a separate sheet
    By titussys in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-25-2007, 11:39 PM
  7. Multiple Sheet Printing Based on Number Input
    By patele in forum Excel General
    Replies: 1
    Last Post: 09-03-2006, 03:40 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