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 in Others by Kithuzzz
• 20,660 points
113 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 by narikkadan
• 37,660 points

Related Questions In Others

0 votes
0 answers
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 in Others by Edureka
• 13,640 points
390 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 in Others by narikkadan
• 37,660 points
131 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,720 points
454 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,100 points
405 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,100 points
3,384 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
2,849 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 in Others by narikkadan
• 37,660 points
67 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 in Others by narikkadan
• 37,660 points
67 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