View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Clayton Dool Clayton Dool is offline
external usenet poster
 
Posts: 2
Default Pivot Table drilldown and protecting workbook

Anyone?

On Wed, 11 Apr 2007 19:05:47 -0700, Clayton Dool
wrote:

I have an excel report with several sheets, each containing a pivot
table. The sheet that contains all the data from the database is
hidden and refreshed through code.

What I would LIKE to do is protect the sheets from being changed.
This is solved part way by protecting the sheets themselves, but users
can still accidentally delete a sheet. This is a major concern given
that the pivot tables have drilldowns that open up new sheets, so user
must delete these themselves.

My refresh of data and pivot tables works as follows:
- Refresh Data on my "Data" sheet (always left unprotected)
- For each worksheet,
- Unprotect sheet
- Iterate through each pivot table and refresh
- Protect sheet


Works great, but like I said, need that one step further to prevent
user from accidentally deleting sheets. How do I allow the user to do
drill downs in a pivot table, which creates a new sheet, allow users
to delete those newly created sheets, but prevent them from deleting
the "primary" sheets?


Thanks in advance,
Clayton