ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How can I protect cells and allow users to insert/delete (https://www.excelbanter.com/excel-worksheet-functions/64716-how-can-i-protect-cells-allow-users-insert-delete.html)

Jammy Dodger

How can I protect cells and allow users to insert/delete
 
I have a range of cells that I want to protect because they contain various
formulae, however, when the worksheet is distributed, users will need to be
able to insert/delete columns. How can I get around this problem.

broro183

How can I protect cells and allow users to insert/delete
 

Hi
I'm using Excel 2002, but I believe it is also possible in earlier
versions to select "enable users to delete columns" as an option when
you choose to protect the sheet [alt+t+p+p]. However, for this to work
all cells in the column must be unlocked, this can be done by [alt+o+e]
- protection - & removing the check next to "locked" for a selected
cell/column etc.
However, this may not be the way to go if you have locked cells with
totals at the base of your columns.

Another option is to set up a macro for deleting the column of the
active cell,
"activecell.entirecolumn.delete",
assigning it to a button & entering the following line in the "this
workbook" module as part of a workbook open macro:
"Sheets("changethis").Protect Password:="changethis", _
UserInterFaceOnly:=True"
The bottom line of code means that the sheet is only protected against
a user changing it manually - any macos will still work.

hth
Rob Brockett
NZ
Still learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=500560



All times are GMT +1. The time now is 01:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com