Using the Do...While Loop with a Condition at the Bottom of the Loop
Sub SignIn() Dim secretCode As String Do secretCode = InputBox("Enter your secret code:") If secretCode = "sp1045" Then Exit Do Loop While secretCode <> "sp1045" End Sub