@Midori Aqui não permite que eu coloque no formato xlsm. Vou enviar os códigos.
Módulo
Public Sub lsShow()
frmLogin.Show
End Sub
Public Sub lsDesabilitar()
ActiveWorkbook.Unprotect Password:="123"
Sheets("Agenda Anual").Visible = False
Sheets("Agenda Mensal").Visible = False
Sheets("Agenda Diária").Visible = False
Sheets("Agendados de Eventos").Visible = False
Sheets("Intervalos de Tempo").Visible = False
Sheets("Afastamentos").Visible = False
Sheets("Aposentadoria").Visible = False
Sheets("Domínio Atendimento").Visible = False
Sheets("Lista de Tarefas").Visible = False
Sheets("Suportes Domínio").Visible = False
Sheets("Índice").Visible = False
Sheets("Senha").Visible = False
ActiveWorkbook.Protect Password:="123", Structure:=True, Windows:=False
ActiveWorkbook.Save
End Sub
frmlogin
Private Sub CommandButton1_Click()
Dim lTotal As Long
Dim lContador As Long
lsDesabilitar
Sheets("Senha").Range("$A$1:$C$50000").AutoFilter Field:=1, Criteria1:="=" & txtUsuario.Text
Sheets("Senha").Range("$A$1:$C$50000").AutoFilter Field:=2, Criteria1:="=" & txtSenha.Text
lTotal = WorksheetFunction.Subtotal(3, Sheets("Senha").Range("A:A"))
If lTotal > 1 Then
ActiveWorkbook.Unprotect Password:="123"
For lContador = 2 To lTotal
Sheets(Sheets("Senha").Range("C" & lContador).Value).Visible = True
Next lContador
Unload frmLogin
MsgBox ("Bem vindo!") & Chr(13) & ("Agenda Particular!!!")
Else
MsgBox ("Usuário ou senha incorretos!") & Chr(13) & ("Contate o Proprietário da Planilha!")
End If
ActiveWorkbook.Protect Password:="123", Structure:=True, Windows:=False
End Sub
Private Sub Frame1_Click()
End Sub
Private Sub txtUsuario_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
KeyAscii = Asc(UCase(Chr(KeyAscii)))
End Sub
Private Sub UserForm_Activate()
txtUsuario.SetFocus
End Sub
Private Sub UserForm_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii = 13 Then ' The ENTER key.
SendKeys "{tab}" ' Set the focus to the next control.
KeyAscii = 0 ' Ignore this key.
End If
End Sub
Esta pasta de trabalho
Sub TelaCheia_On()
'Oculta todos os Menus (Ribbons)
Application.ExecuteExcel4Macro "SHOW.TOOLBAR(""Ribbon"",False)"
Application.DisplayFormulaBar = False
ActiveWindow.DisplayHeadings = False
With ActiveWindow
.DisplayVerticalScrollBar = False
.DisplayWorkbookTabs = False
.DisplayHeadings = False
.DisplayZeros = False
.DisplayHeadings = False
.DisplayGridlines = False
End With
End Sub