Allow Edit Ranges in a Protected Sheet - set and change permissions for Users using VBA

Brass Contributor

I have a (Microsoft 365) Excel workbook that is shared on Sharepoint amongst 8 users. The way I have set it up is that they all can edit a particular range in a worksheet that is protected (Allow Edit Ranges with normal users able to edit a designated range with no password whilst the rest of the worksheet is protected with a password) with a user or users who can edit anything in the worksheet without using a password - in effect a superuser or an administrator. I would like to be able to change the user permissions such that another user can be designated as an administrator (ie able to edit the worksheet without a password whilst keeping) etc. However, I have not found anywhere where I can actually do this using VBA. Currently I have to physically unprotect the sheet using a password and then change the permissions under the Allow Edit Ranges tab. Is there a way to change these permissions under the Allow Edit Ranges Tab using VBA?

Thank you.

0 Replies