Help with Pivot VBA Function.

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
I need help with VBA to return in msgbox to display the type of Pivot Version and Style and View [xl 2003/xl2007] it currently has if possible....
 
Last edited:

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
From 2010, though it probably isn't very different for earlier versions of excel:
If you do something like this and set a break on the third line, you will be able to see many properties of the pivot table in the Locals pane, though it's not all inclusive:
Code:
Sub blah8()
Set zzz = ActiveSheet.PivotTables(1)
With zzz
Debug.Print .Version
Debug.Print .TableStyle
Debug.Print .TableStyle2.Name
Debug.Print .TableStyle2.NameLocal
End With
End Sub
 
Upvote 0
p45cal, i show your post yesterday but didnt get time to check it...
This is perfect in 07 [andi i use offfice 07 version]...this is what i want...

Thanks for helping....


From 2010, though it probably isn't very different for earlier versions of excel:
If you do something like this and set a break on the third line, you will be able to see many properties of the pivot table in the Locals pane, though it's not all inclusive:
Code:
Sub blah8()[/FONT]
[FONT=Courier New]Set zzz = ActiveSheet.PivotTables(1)[/FONT]
[FONT=Courier New]With zzz[/FONT]
[FONT=Courier New]Debug.Print .Version[/FONT]
[FONT=Courier New]Debug.Print .TableStyle[/FONT]
[FONT=Courier New]Debug.Print .TableStyle2.Name[/FONT]
[FONT=Courier New]Debug.Print .TableStyle2.NameLocal[/FONT]
[FONT=Courier New]End With[/FONT]
[FONT=Courier New]End Sub[/FONT]
[FONT=Courier New]

 
Upvote 0

Forum statistics

Threads
1,224,527
Messages
6,179,345
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top