Protect excel sheet but allow data entry with form

0 votes

I have an Excel form where users may enter data, but I do not want them to be able to modify the data after it has been entered. They should just be able to add data to the form, that's all. The problem is that I won't be able to add data using the form if I secure my sheet.

I can lock the remaining rows and unlock the first row, allowing me to add data. However, that only solves 90% of my issue.

I tried this code in ThisWorkbook :

Private Sub Workbook_Open()
    Me.Worksheets("Sheet1").Protect UserInterfaceOnly:=True
End Sub

Then I locked my sheet and it's still giving me error 1004. Can someone please help me with this?

Sep 29, 2022 in Others by Kithuzzz
• 38,000 points
1,564 views

1 answer to this question.

0 votes

Try this:

Private Sub Workbook_Open()
    Me.Worksheets("Sheet1").Protect UserInterfaceOnly:=True
End Sub

And then lock your sheet like you normally would.

answered Sep 30, 2022 by narikkadan
• 63,600 points

Related Questions In Others

0 votes
0 answers

Data Driven Framework -- how to read and write in excel sheet using Selenium WebDriver with java

I'm using this code to read something, ...READ MORE

Oct 31, 2022 in Others by Kithuzzz
• 38,000 points
650 views
0 votes
1 answer

How can I count the rows with data in an Excel sheet?

With formulas, what you can do is: in ...READ MORE

answered Dec 27, 2022 in Others by narikkadan
• 63,600 points
603 views
0 votes
0 answers

Download Excel sheet from .NET Core 3.1 Web API with jQuery Ajax client

I am trying to download an Excel ...READ MORE

Feb 10, 2022 in Others by Edureka
• 13,690 points
1,126 views
0 votes
1 answer

How to print an Excel Sheet using VBA with Nitro PDF Creator in Excel 2016

you can use the built-in excel facilities ...READ MORE

answered Sep 24, 2022 in Others by narikkadan
• 63,600 points
1,346 views
0 votes
1 answer

Retrieve epay.info Balance with VBA and Excel

This code should log you in, provided ...READ MORE

answered Sep 5, 2018 in Blockchain by digger
• 26,740 points
1,212 views
0 votes
1 answer

ImportError: openpyxl is required for loading excel format files

Forget the PsychoPy complications for the time ...READ MORE

answered Oct 3, 2018 in Python by Priyaj
• 58,020 points
1,078 views
0 votes
1 answer

In Blue Prism how to split excel column data into TWO columns

This is how I am doing it. Dim ...READ MORE

answered Oct 15, 2018 in RPA by Priyaj
• 58,020 points
4,369 views
0 votes
1 answer

Excel Power Query: Using List.MatchAny on a column value

try this. let TableA = ...READ MORE

answered Oct 22, 2018 in Power BI by Annie97
• 2,160 points
4,251 views
0 votes
1 answer

Create charts in excel sheet [ in same sheet along with data C#]

Unfortunately, it's not that simple. Use the ...READ MORE

answered Oct 11, 2022 in Others by narikkadan
• 63,600 points
1,165 views
0 votes
1 answer

(Excel) Data Entry Form inputting data into table

Solution  Fill in all the fields in your ...READ MORE

answered Oct 15, 2022 in Others by narikkadan
• 63,600 points
1,269 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP