Created Pivot table/chart, password-protected and put onto website (ie NOt
saved file as Web Page). Click on link, get warning message concerning macros
and prompted for password. If attempt to change data button by rightclicking
on it and selecting format - get error message 'Pivot Table not valid'. Note,
accessing the file directly (ie not via the web) works perfectly Ok.

PS Also get visual basic error message ' Run time error 1004 :Unable to set
the default property of the Pivotitem class'

VB code

Sub All_Years()
CP = "(All)"
pf = "Year First Seen"
Call DeleteOldItemsWB 'this runs OK'
Call Hosp(CP, pf) 'this stops at line 3'
Call Tumour(CP, pf)
End Sub

Public Sub Hosp(X, Y)
Sheets("Hospital Chart").Select
ActiveChart.PivotLayout.PivotFields(Y).CurrentPage = X ' line 3'
Sheets("Home").Select
End Sub