Trouble with vba and table protection

Electriccraft1

New member
Joined
Jun 22, 2017
Messages
2
Reaction score
0
Points
0
I would like to thank anyone in advance for help with my problem. I am using excel 2010. I have a table that data is added to by a userform. On the same sheet, I have 2 cells that need to be unlocked for use as well.

My issue is that I have researched how to protect the sheet, so table data can only be changed by the userform, essentially locked from use. I have tried activesheet.protect method with userinterfaceonly on workbook open event, but I am still able to access the table data and change it on the sheet directly, which is not what I want. Also, the table cannot be added to from the userform as the other cells on the sheet are locked.

I also found a post somewhere about using access and then linking to the access database on a protected sheet. I tried this, and am able to get my data, except when I use the protection above. Refresh cannot happen as the sheet is read-only.

There has to be a way to accomplish this.

Sent from my SM-G955U using Tapatalk
 
Any chance of attaching your (de-sensitized) workbook and code ?
 
Actually I figured it out. Upon opening of userform, unprotected, then protected on close. Thanks though.
 
Back
Top