Locking a worksheet / workbook

Jnegi1030

New Member
Joined
Dec 5, 2017
Messages
3
I made a spreadsheet for a client, It has lots of formulas and linking between worksheet (65 to be exact). There is only 2 fields in each sheet that I want the client to be able to enter information in which will then calculate things properly based on the formulas ect.

So my questions is there a way to lock all the worksheets except for 2 cells that i want them to be able to enter in a value into?

Thank you!
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Hello :)

By default all cells are protected when you choose to protect the sheet. So what you need to do is select the cells you want someone to be able to key into and right click on that cell and select FormatCells. On the next pop up choose the Protection tab and remove the check mark that says Locked. Now when you protect your sheet (right click sheet tab and select Protect Sheet) the only cells you can enter data in are the ones you just removed the protection from. Hope this makes sense.

Good Luck,
mark :)
 
Upvote 0
Unlock the cells you want and then set sheet protection.

I like to let code modify data without unprotect protect so I do this in ThisWorkbook.
Code:
Private Sub Workbook_Open()
  Dim ws As Worksheet
  For Each ws In Worksheets
    ' UserInterfaceOnly:=True allows code to change data.
    ws.Protect "ken", UserInterfaceOnly:=True, DrawingObjects:=True, _
      Contents:=True, Scenarios:=True
  Next ws
End Sub

Don't forget to lock your VBAproject as well.
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,331
Members
452,636
Latest member
laura12345

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