I currently have a workbook that when it opens, a message box appears warning them that they need to have a certain role to continue to open and view the data. However, they can still click OK instead of Cancel to proceed as nothing stops them from doing it (in the event the workbook get's forwarded).
Is there a piece of code that will check if the "UserName" matches a list of usernames in a table in a hidden tab and if located, allow them to continue to as normal and view the aforementioned message box? If the "UserName" doesn't match any of the usernames, than they will get a different message such as:
"You are not authorized to open or view this file. To get access, please contact the administrator." {the workbook will than close)
Bookmarks