Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Pivot Table Name without Select 1

Status
Not open for further replies.

Zwicky

Technical User
Aug 7, 2006
9
AU
Hi Everyone,

I am trying to change a pivot table name in excel vba code within a worksheet_change function
(Private Sub WorkSheet_Change(ByVal Target As Excel.Range)which does not allow you to use the select method for another worksheet.

I have tried:

Sheets("Pivot").Range("B12").PivotTableWizard TableName:="Pivot"

and

With Sheets("Pivot").Range("B12").PivotTableWizard(TableName:="Pivot")
End With

where B12 is one of the cells in the pivot table.

I get the error 438: Object doesn't support this property or method

Any ideas?

Thanks in advance to anyone who can help!
 



Hi,
Code:
Sheets("Pivot").Range("B12").PivotTable.Name="Pivot"


Skip,
[sub]
[glasses] [red][/red]
[tongue][/sub]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top