Hello Mr. DJ, welcome to the forum.
That sounds frustrating indeed. This kind of thing is new for me too, so I'm not sure if this is the solution you want.
I added an example with a protected sheet. All cells in this sheet are locked. The password for this sheet is "password".
When the workbook opens it will check for a username.
First it will check for your username, which you will have to add to the code. I added notes to the codes which hopefully make it easier to understand.
The code will unlock the sheet. The password "password" is stated in the VBA code to unlock it. It will unlock the columns you provided and afterwards it will lock it again with this password. My suggestion is to put a password on the VBA project as well to avoid people seeing the sheet password in the code.
You have to edit these codes for unlocking and locking the sheet with your password
When it's not you who is opening the file, it will check for the username which can edit column H. If they match, it will unlock column E to H, since column E to G can be edited by anyone.
You have to edit that here:
When it's not you, nor the person who can edit column H, it will only unlock column E to G.
When you download it now, it could give you an error because of these parts:
You have to edit "Sheet1" to match with your sheet name.
I hope this helps.
Kind regards,
Marco
Bookmarks