Protecting Columns

HunterN

Active Member
Joined
Mar 19, 2002
Messages
479
I want to allow the user to modify the worksheet, but NOT allow them to modify the
Project Number (which is always in the first column).
Can this be done? If so, how can I write this in VB code?

Thanks, Nancy
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
no need for code,

just password protect the first column.
First unlock cells that will receive data,
then,
Go tools, protection, protect sheet.
Remember cells are set to locked by default, so you have to unlock the cells that will receive data before you protect the sheet.

HTH,
Corticus
 
Upvote 0
Exactly. I don't want them to be able to change the Project Number if they choose the Modify button. I still want the first column visible. They just can't change it.
There is three other columns that can be change that go with the Project Number.

Nancy
 
Upvote 0
What you need to is change the protection of the cells so that they are unlocked apart from column A. You then go tools, protection, protect sheet and the user will not be able to edit any data which is in column A.

Hope this helps
 
Upvote 0
I just can't get it working!

This is the code:

Worksheets("MCAR Project List").Unprotect
Range("A3").Select
Range(ActiveCell, ActiveCell.End (xlDown)).Select

Selection.Locked = True
Selection.FormulaHidden = True

bottomRw = Application.CountA (ActiveSheet.Range("A:A"))

ActiveSheet.Range(Cells(2, 2), Cells(bottomRw, 4)).Select

Selection.Locked = False
Selection.FormulaHidden = False
Range("A1:D1").Select
ActiveSheet.Protect Contents:=True, Scenarios:=True

It still won't allow me to update just the three columns. Everything is protected.

Any suggestions? Nancy
 
Upvote 0
I understand that there is no need to use code to do this, but I am within a system module that does not allow the user access to the taskbar or formula bar until they press the 'MODIFY' button. Which means that it has to be written in VB code. I have tasted it on a separate spreadsheet and it works but I can't get it to work with my VB code as above.
 
Upvote 0

Forum statistics

Threads
1,224,416
Messages
6,178,503
Members
452,853
Latest member
philipnjk64

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top