Auto Program Pivots from a userform

R

rivers

Hi

Is it possible to auto program a pivot to select certain months within a
list selected on a user form so that the Pivot can be updated to these months

eg i select 3 or 4 months on my worksheet from a multiselect list which
updates a pivot on another worksheet without the need to manually select the
sheet and then selecting the pivot table.

any help would be greatfully appreciated

thanks

Rivers
 
T

Tom Ogilvy

You can reference all the properties and attributes of a pivottable on
another sheet without making that sheet active or selecting the pivot table.

Instead of
worksheets("Sheet1").Activate
Range("A1:Z26").Select

you would use

Worksheets("Sheet1").Range("A1:Z26")

or for a pivottable
worksheets("Sheet1").pivotTables("PivotTable1").

and so forth.


See examples at Debra Dalgleish's site
http://www.contextures.com/tiptech.html

See P for Pivot Tables
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top