View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dickie Worton Dickie Worton is offline
external usenet poster
 
Posts: 24
Default VBA solution for printing specific pages

Can anyone help me with the following, please?

I have an Excel workbook in which the first page is a summary or index
sheet, containing hyperlinks to each of the subsequent sheets.

I'd like to be able to allow those to whom I am distributing it the option
of printing a predetermined selection of those sheets, based on the whether
or not a specific cell in those sheets contains a specified value.

For example, sheets no's 1, 4 & 6 all contain a specific value in cell L6;
I'd like users to be able to click on a macro on the summary page and for the
macro to locate and print a copy of sheet no's 1, 4 & 6 before returning the
user to the summary page. The values in cell L6 may change, although they
should never deviate from a range of options chosen from a drop-down list.

As such, what I am after is a macro or some VBA code that will search for
each page where that value occurs in cell L6 and prints that page, rather
than a more simple macro that directs users to a pre-defined list of pages,
seeing as these may change.

Is this possible at all? I'm trying to build some future-proofing of sorts
into this workbook so that the macros or code don't need rewriting each time
there is a variation to the value in cell L6 on any of the sheets.

Any suggestions greatly appreciated.

Thanks,

Dickie