View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Preventing Range Name changes

Get Jan Karel Pieterse's (with Charles Williams and Matthew Henson) Name
Manager:

You can find it at:
NameManager.Zip from http://www.oaltd.co.uk/mvp

It allows you to hide existing names (and unhide them, too).

It offers a lot of nice features that will make working with names easier.

Steven wrote:

I have 4 key ranges in a file. I do not want the users to be able to change
the range names. It seems if you do not Protect each sheet then they will
have access to the ranges in Insert / Name / Define. The sheets are
protected but If they insert a new worksheet then they will have access to
delete a range. I dont want to Workbook Protect because I have had bad
experiences with Pivot Table corruption on opening the file that is Workbook
Protected.

I have done a workaround in the BeforeSave event. Before the file saves it
tests that the ranges exist in their proper worksheet. If not then the save
is cancelled and a message appears telling the user not to change range names.

Is there a way to not allow range name additions or deletions in a file by
code? Like putting it in the OnOpen event.

Thank you for your help.

Steven


--

Dave Peterson