Name of the current pivottable from active cell

F

f-x.p

hi,

I need a macro to resize the column of the **current** pivot table.
All the code sample I have found suppose that you already have the
name of the pivot table to apply any modification.

Is there a way to find the current pivot table from the active cell ?



Here is the code I need to modify:

ActiveSheet.PivotTables("Tableau croisé dynamique1").PivotSelect
"", _
xlDataAndLabel
Selection.ColumnWidth = 9


Thank you for your help

François
 
F

f-x.p

Hi,

Thank you Ryan, but I have finally found the solution (at least, **a**
solution):



ActiveCell.CurrentRegion.ColumnWidth = 9



Simple, clear, efficient :)

Thanks for your answer, I will have a look at your utility if I am in
need of further features.

Regards

François
 

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