Hi Tania,
usually access privileges should be managed within the database the PivotTable connects to. Use the domain\userid then no additional password needs to be entered (single sign on) and you don't need to mess around with VBA...
The advantage is that future PivotTables based on this database will then automatically also behave the way you want:-)
Bookmarks