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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Stop Column Delete/Add but Allow data entry 1

Status
Not open for further replies.

WelshyWizard

IS-IT--Management
Apr 23, 2006
89
GB
Hi all,

I'm looking to stop users from adding/deleting columns but I do want to allow them to edit, add, delete data held within the columns.... I was thinking I could put some code on the auto_open?

Any ideas?

Cheers

Today is the tomorrow you worried about yesterday - and all is well.....
 
This may suit. Ensure that each row and column has a Locked Cell that does not need to be edited, headings for example. Unlock all other cells. Protect the sheet. The unlocked cells can be edited, but rows and columns cannot be deleted because of the locked cell.
 
No VBA required....

Select the entire sheet. (This can be done by either clicking on the gray square to the left of the column headers (A, B, C) and above the row headers (1, 2, 3) OR simply by pressing [CTRL]+[A]).

Go to Format > Cells > Protection and uncheck Locked.

Now go to Tools > Protection > Protect Sheet.

Viola!

(Note: This is very similar to Remou's suggestion, but there is no need to have locked cells in any row or column to prevent it from being deleted,)

[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]

Help us help you. Please read FAQ181-2886 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top