+ Reply to Thread
Results 1 to 8 of 8

Print sheets with cell argument

  1. #1
    Registered User
    Join Date
    04-16-2008
    Posts
    13

    Print sheets with cell argument

    Hello-

    I know there are countless posts on print macros, so I apologize in advance. However, I've read most of them, and none of them seem to be what I need and/or just cant seem to get them to work for me.

    I have multiple tabs, only about half of which I would like to print. I have set the first tab as a "Print" tab, where there is a list of all tabs and you can enter "1" to print or "2" not to print. I then have the cell A301 of each of those respective tabs linked to their respective cell on the "Print" tab.

    Therefore, I need to create a macro that prints only the tabs that have the value "1" in cell A301. Once again, thanks in advance for the help.

    -jw-

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Welcome to the forum, and thank you for a descriptive thread title and a lucid question on your first post.

    If column A contains a list of sheet names, and column B contains a 1 if the sheet is to be printed, then try this:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    04-16-2008
    Posts
    13

    Thanks

    shg-

    Thanks for the quick response. This code worked great. However, I'm trying to understand it a little bit better so that I can manipulate it a bit. For example, as the code is now, it prints only the first tab that meets the "1" criteria, while I have close to 45 tabs that will need to be printed. In addition, I will likely move the columns on the "Print" tab around a bit (which I thing I can handle in changing the code).

    This particular code is just foreign enough to scare me into attempting that fix myself, but I'd also like to know how the process is running in the case that I need to make any other changes without bothering the fine contributors here.

    Once again, endless thanks-

    -jw-

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Post an example just containing just the Print tab and a couple of other tabs (the data can be junk).

  5. #5
    Registered User
    Join Date
    04-16-2008
    Posts
    13
    I have attached a sample. The first "Print" tab is what I'm currently working with. The "Print (2)" tab is something I might be working with down the road.

    The part I'm unclear of is what part of the code could be changed to include not just "A1" but "A1:A50" for example. Putting "A1:A50" into the macro may be all it takes, but I'm not familiar enough with the code's process to know if that would be the case.

    Can't thank you enough-

    -jw-
    Attached Files Attached Files

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Soory, the mistake was entirely mine:
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    04-16-2008
    Posts
    13
    That's the one!

    A little token of my gratitude

    -jw-

  8. #8
    Registered User
    Join Date
    02-28-2011
    Location
    Las Vegas
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Print sheets with cell argument

    I just found the above link and I got everything to work. However, since I have the same issue but want to print to a FDF-writer I would like the macro to "activate / high light" the tabs instead of printing them out individually..!! Is that possible??

    Thanks a lot in advance.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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