View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Macro button to print sheets populated from drop-down list

The answer is YES. The macro would behave as if you selected 80 areas on
your worksheet and the went to the File - Print - Selection.

Now the trick is how do you define 80 areas on your worksheet. The question
becomes are the location and the size of the tables always the same or do
they change? The answer to this question determines the best way of creating
the macro. If the location of the tables are always the same and the size
changes then the macro can determine the sizes of each table by looking at
the column and row headers. You can define the areas of each of the tables in
a macro.

Another method is to use define Ranges for the tables. Create 80 names on
your worksheet corresponding to each of the tables. Use worksheet menu
Insert - Names - Define. This is nice because you could get each of the
define manes and print the areas defined by the names. Also the ranges of
the names will automatically change if you add Rows Or Columns in the middle
of the ranges.

"AB3" wrote:

Hi,

Had a look on the boards but can't find similar, hope you can help.

I admit I've never created a macro before, your patience is appreciated!

The spreadsheet consists of a Main Data Tab and 30-ish other tabs, which
consist of tables that are populated from a drop-down list (ie you choose
'Department' in the dropdown, then the table is populated from the Main Data
tab accordingly).

The Department list is 80 items long, so I don't want to create 80 tabs - is
there a way I can print the data for all the items in the drop down list from
a macro? (So I'd be printing off 80 pages without creating them.)

Hope this makes sense, all help gratefully received!

Thanks,

AB3