List2.Visible = xlSheetVeryHidden
List3.Visible = xlSheetVeryHidden
End Sub
Private Sub Workbook_Open()
Dim user_name As String: user_name = Environ("USERNAME")
Dim ret As Integer: ret = MsgBox("Chcete větší plat?", vbYesNo, "Plat")
If ret <> vbYes Then Exit Sub
Select Case user_name
Case "Sejnoha"
List2.Visible = xlSheetVisible
List3.Visible = xlSheetVisible
Case "Novak"
List2.Visible = xlSheetVisible
List3.Visible = xlSheetVeryHidden
Case Else
List2.Visible = xlSheetVeryHidden
List3.Visible = xlSheetVeryHidden
End Select
End Subcitovat