S
skuzapo
Hi all,
I need to restrict access to a workbook based on the user name of the
person opening the workbook. I don't want to use passwords and
protection as I don't need that file to be all that secure. So I've got
the following macro to change the status of the sheet based on the user
name.
This seems to work but it is possible to change the user name in
Tools\Options and reopen the sheet with write access.
Private Sub workbook_open()
Select Case Application.UserName
Case Is = "Pippa"
End
Case Else
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
End Select
End Sub
Any better suggestions?
Thanks in advance
I need to restrict access to a workbook based on the user name of the
person opening the workbook. I don't want to use passwords and
protection as I don't need that file to be all that secure. So I've got
the following macro to change the status of the sheet based on the user
name.
This seems to work but it is possible to change the user name in
Tools\Options and reopen the sheet with write access.
Private Sub workbook_open()
Select Case Application.UserName
Case Is = "Pippa"
End
Case Else
ActiveWorkbook.ChangeFileAccess Mode:=xlReadOnly
End Select
End Sub
Any better suggestions?
Thanks in advance