Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Sub NumInRange()
- Dim num As Integer
- num = CInt(InputBox("Enter valid number!"))
- '1 - 100
- Do While num < 1 Or num > 100
- num = CInt(InputBox("Enter valid number!"))
- Loop
- MsgBox "The number is: " & num
- End Sub
- Sub Password()
- Dim validPassword, inputText As String
- validPassword = "s3cr3tPassw0rd"
- inputText = InputBox("Enter password!")
- Do While inputText <> validPassword
- inputText = InputBox("Enter password!")
- Loop
- MsgBox "Welcome"
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement