Private Sub CommandButton1_Click()
Dim oFSO, mpd$, chemin$
Set oFSO = CreateObject("Scripting.FileSystemObject") ' test si le ficher existe
chemin = "C:\Temp\Test.xls"
If oFSO.FileExists(chemin) And TextBox1.Value = "toto" Then
Workbooks.Open chemin
Else
MsgBox "mot de passe invalide"
End If
Me.Hide
End Sub