A simple thing would be to close the workbook if the windows logon doesn't match, something like this
Don't forget to create a Welcome sheet, and the code goes in the ThisWorkbook module.![]()
Private Sub Workbook_BeforeClose(Cancel As Boolean) Dim sh As Worksheet Sheets("Welcome").Visible = xlSheetVisible For Each sh In Sheets sh.Visible = xlSheetVeryHidden Next sh End Sub Private Sub Workbook_Open() Dim sh As Worksheet If Environ("username") <> "Simon" Then Application.Quit Else For Each sh In Sheets sh.Visible = xlSheetVisible Next sh Sheets("Welcome").Visible = xlSheetHidden End If End Sub
Bookmarks