Private Sub TextBox2_Enter()
    Dim sPW As String
    sPW = InputBox("Please enter the password...", "Password needed...")
    If sPW <> "3j9l^k564x$2w5m9u" Then TextBox1.SetFocus: Exit Sub
    MsgBox "You're in!"
End Sub


Private Sub TextBox2_Exit(ByVal Cancel As MSForms.ReturnBoolean)
    Sheet1.Range("C5") = TextBox2
End Sub
Or use Private Sub TextBox2_AfterUpdate() for writing to the sheet