ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Language independent Pivot settings (https://www.excelbanter.com/excel-programming/361833-language-independent-pivot-settings.html)

claude

Language independent Pivot settings
 
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?

MIKE215

Language independent Pivot settings
 
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").C urrentPage.Name
Then use the variable to set the page to ALL whenever needed.
PivotTables("PivotTable1").PivotFields("METRIC").C urrentPage = strpgname
The strpgname variable should have the word for all in whatever language is
being used.

Mike


"Claude" wrote:

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?



All times are GMT +1. The time now is 04:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com