office交流网--QQ交流群号

Access培训群:792054000         Excel免费交流群群:686050929          Outlook交流群:221378704    

Word交流群:218156588             PPT交流群:324131555

VBA获取当前活动单元格所在的数据透视表

2020-12-26 08:00:00
zstmtony
原创
3805
VBA获取当前活动单元格所在的数据透视表

Dim strPvName As String
on error Resume next
strPvName = Selection.PivotCell.Parent
If err.number=0 then
  msgbox "数据透视表名:" & strPvName 
Else
  msgbox "没有数据透视表"

End If


这样就可以解决问题了。

分享