View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jack Jack is offline
external usenet poster
 
Posts: 10
Default Worksheet Protection Question

I'd like to protect a worksheet so that all Locked cells are unselectable yet
the user will have the ability to insert a picture when an unlocked cell is
selected. Basically, the top 12 rows are locked and the remaining cells are
unlocked.

Using the following:

ActiveSheet.Protect Password:=MyPassword, Contents:=True,
DrawingObjects:=False, UserInterfaceOnly:=True

does exacly what I need when running in Excel 2007.

However, the same code in Excel 2003 & 2002 doesn't allow for inserting a
picture via the Insert Picture From File command. I've tried every
possibility I could think of for the Protect method, however, it is not until
I set Contents:=False that I find the Insert Picture From File is enabled. Of
course at this point, all the Locked cells are now essentially unlocked.

My current solution is to set Contents to True for Excel 2007 and to False
for all earlier versions. Needlesstosay, I'd like to find a better solution.

Any suggestions?

Thanks!
--
Jack Waller
<<