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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code to set pivot table link to source file on each open

Status
Not open for further replies.

jdttek

Technical User
May 8, 2002
112
US
I have a pivot table on which the link to the source file and range was proerly set using the wizard. Someone tried to change the link (on purpose or by mistake, I'm not sure)and srewed up the link. I somehow need to set or confirm the intended link each time the Pivot table is opened so that this does not happen again. Any suggestions on right VBA direction to head wld be greatly appreciated. Thanks

jdttek
 
Hi,
You could write some code in the Worksheet_PivotTableUpdate event that would maintain the source data link.

Use the macro recorder to see how the Pivot Table responds to such a change. If the source data changes, just stick it back in. :) Skip,
Skip@TheOfficeExperts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top