Macro to Format the Pivot Table drill down

M

MESTRELLA29

Macro to Format the Pivot Table drill down.

I need a way to run a macro when i do a drill down on a pivot table.

what i have is a summary of a source data, that when users access this and
try to get detail, i what to format the sheet that the pivot table generates
when it does the drill down.

Basically, double click on pivot table opens the drill down detail, then run
the macro to format this sheet.

Did a made my self clear???
 
T

Tom Ogilvy

Did you try using the NewSheet property of the workbook object. I tested
it in xl97 and it worked for me.,
 
M

MESTRELLA29

Sorry,

can you be more specific?

Tom Ogilvy said:
Did you try using the NewSheet property of the workbook object. I tested
it in xl97 and it worked for me.,
 
T

Tom Ogilvy

I meant NewSheet event

See Chip Pearson's page on events if you are not familiar:

http://www.cpearson.com/excel/events.htm

When you drill down, a new sheet is created and triggers the newsheet event
with a reference to the new sheet. You can have your code check if it is of
the format of the pivottable and then do your formatting if it is.
 
M

MESTRELLA29

thanks,

I will try this and see if it works...

Tom Ogilvy said:
I meant NewSheet event

See Chip Pearson's page on events if you are not familiar:

http://www.cpearson.com/excel/events.htm

When you drill down, a new sheet is created and triggers the newsheet event
with a reference to the new sheet. You can have your code check if it is of
the format of the pivottable and then do your formatting if it is.
 

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