Language independent Pivot settings

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am using the following code to set the PivotField in an existing Pivot
table:

Workbooks(filename).Sheets(sheetname).PivotTables(tablename)PivotFields(fieldname).CurrentPage = "(All)"

However the "(All)" only works in english versions of Excel. Is there a way
to set this field in a language independent way?
 
Claude,

Not exactly what you want but this might help. When you form the pivot
table the default setting for that page field is ALL. Before you do anything
else store the that name in a variable:
strpgname =
PivotTables("PivotTable1").PivotFields("metric").CurrentPage.Name
Then use the variable to set the page to ALL whenever needed.
PivotTables("PivotTable1").PivotFields("METRIC").CurrentPage = strpgname
The strpgname variable should have the word for all in whatever language is
being used.

Mike
 

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

Back
Top