Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - disable column delete 2

Status
Not open for further replies.

MO22

Technical User
Apr 20, 2001
43
CA
I have a shared, protected workbook. I want all users to be able to edit all cells, but would like to disable any method of deleting columns (menu or right-click).

How do I write a macro to do this?
Thanks
 
Steps:

1) Click on the little box - above the "1" for row 1, and to the left of "A" for Column A.

This will select the entire worksheet.

2) Right-Click, and choose "Format Cells.

3) Click the "Protection" tab.

4) Un-check "Locked"

5) Turn protection on for the worksheet with: Tools - Protection - Protect Sheet. IMPORTANT: Don't forget your password.

Hope this helps. :)

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca

 
But won't that lock the sheet for editing as well? I only want to prevent them from deleting columns from the structure, not from deleting data itself.

(PS - thanks for the file just now - it was fun!)
 
You're welcome for the Cute Quiz file - glad you enjoyed it.

As for users still being allowed to "edit"... If you follow the steps I specified, this will "un-lock" ALL the cells on the worksheet - thereby allowing users to "edit" ALL cells.

However, because the sheet is protected, it will prevent users from deleting columns.

I suggest you try the steps. Then please advise as to how you make out.

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
It worked!
Thanks again.
 
Not sure how MO22 got the star but I give one to Dale for a good response
Geoff
 
Hey, I don't get much credit here at work, so I'll take a star from anyone, even if I have to steal it from an expert!
 
heh heh :) - I've noticed this on a coupla occaisions recently - the original poster is getting a star - website error or user error ??? I know that you can't "star" your own posts so I is a bit confused ???
G
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top