+ Reply to Thread
Results 1 to 6 of 6

Macro to select and print selected sheets

  1. #1
    Registered User
    Join Date
    01-06-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    16

    Macro to select and print selected sheets

    Hi,

    I have a file that I wish to print selected sheets. The file has an index which is linked to the range of worksheets. Some will be not applicable and not required to be printed.

    I have found the attached macro which creates a check-box dialogue which can select manually the sheets to be printed, whilst this works it is not what I am after as the index worksheet already identifies the worksheet required.

    What I am after using the test file I have loaded is a macro that recognises a value in column B of the worksheet "Control Sheet" and prints those sheets so designated.

    The other thing that I am after is to print it to pdf (I have acrobat pro enabled in excel)

    Hopefully that is clear - please let me know if not.

    The code of the macro that I found is below:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by cnhtractor; 07-17-2014 at 05:35 PM.

  2. #2
    Registered User
    Join Date
    01-06-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Macro to select and print selected sheets

    Further to my post above the following code is doing what I am after EXCEPT it is printing each worksheet separately. So when it is printing to pdf it creates seperate pdf files.

    Any suggestions on modifying this code to print all selected sheets in one file will be appreciated.

    Please Login or Register  to view this content.
    Last edited by cnhtractor; 07-17-2014 at 05:34 PM.

  3. #3
    Registered User
    Join Date
    01-06-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Macro to select and print selected sheets

    Would love some guidance if anyone can help.

    Thanks
    cnhtractor

  4. #4
    Registered User
    Join Date
    01-06-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Macro to select and print selected sheets

    I am still struggling with this. I have been looking at various forums and have three macros which each, in part, does what I want. However none individually does what I need, the first macro which creates checkboxes is the nearest.

    My specifications:

    Control Sheet -

    Cells A2 onward has a pre-populated list of worksheets in workbook
    cells B2 onward has a code to indicate the worksheet is to be populated

    Worksheets Test1, Test2 and Test3 are the range of worksheets that can be printed

    Macro that takes the code from Control Sheet B2 onward to print to a pdf file with a predetermined name in the current folder.

    Help will be appreciated - as I said I have been looking at various forums and posts to try and find code. Unfortunately I do not have the skills to modify the VBA code myself.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    01-06-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Macro to select and print selected sheets

    HI, I have reached a solution with the following code:

    Please Login or Register  to view this content.

    Can someone suggest how I get this to save in the folder of the excel workbook that it is coming form and secondly how to specify a file name, eg "test.pdf"

    Thanks

  6. #6
    Registered User
    Join Date
    01-06-2014
    Location
    Sydney
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Macro to select and print selected sheets


+ 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. Creating a macro to print only the sheets and portion of sheets that i select.
    By cadamhill in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-31-2012, 01:48 PM
  2. Select multiple cell groupings and print selected
    By macronovice1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-07-2012, 05:44 PM
  3. Print Selected Sheets with VBA
    By cg0789 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-31-2012, 11:16 AM
  4. macro to print selected sheets
    By hard worker in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 08-30-2012, 02:06 PM
  5. Replies: 1
    Last Post: 05-15-2006, 04:10 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