Looking for a way to restrict/allow access to column/cell (range) by certain user.
It's required for a table where data in each column is approved/reject by certain function.
Looking for a way to restrict/allow access to column/cell (range) by certain user.
It's required for a table where data in each column is approved/reject by certain function.
You can only do this by using sheet protection and a password. You cannot have different passwords for each user though.
Thank you,
Can I restrict access to certain cell by using Environ("USERNAME") rather than password?
Not an expert by any stretch, but...Found this on another page...see if this could help using with a series of "If Then" statements...
Sub sumit()
Dim mainworkBook As Workbook
Set mainworkBook = ActiveWorkbook
mainworkBook.Sheets("Main").Range("A1:C5").Value = "Locked"
mainworkBook.Sheets("Main").Range("A1:C5").Locked = True
ActiveSheet.Protect Password:="xx"
End Sub
Allows you to unlock specific range. If you use this with an "IF Then", you could unlock certain ranges of cells based upon the users input into a small user form that launches on open of the workbook?
Just an idea
You could use the username, but you cannot lock certain cells or one person and a different range for another. I suppose you could lock differnt ranges sing VBA dependant on the username.
I'll take a look later
Don’t have an account yet? Register yourself now and be a part of our community!