ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Quickie... How to change a name with a macro? (https://www.excelbanter.com/excel-programming/349707-quickie-how-change-name-macro.html)

pauloreiss[_5_]

Quickie... How to change a name with a macro?
 

I have the following object:
-ActiveSheet.PivotTables("Table Number 5").PivotCache.Refresh-

I would like to change the name of this PivotTable.

But the macro will do this in many different files with different
PivotTable names, and i want them all to be the same!

There is only one pivottable for each file. The would open the file,
activate the table in that sheet and change it to the standart name.

Somebody help, plz!


--
pauloreiss
------------------------------------------------------------------------
pauloreiss's Profile: http://www.excelforum.com/member.php...o&userid=29820
View this thread: http://www.excelforum.com/showthread...hreadid=498673


funkymonkUK[_87_]

Quickie... How to change a name with a macro?
 

try

x = Table Number 5

ActiveSheet.PivotTables(x).PivotCache.Refresh

if u need to change the name just type

x= sample

so now it should be

ActiveSheet.PivotTables("Sample").PivotCache.Refre sh


--
funkymonkUK
------------------------------------------------------------------------
funkymonkUK's Profile: http://www.excelforum.com/member.php...o&userid=18135
View this thread: http://www.excelforum.com/showthread...hreadid=498673



All times are GMT +1. The time now is 06:01 PM.

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