Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- strVar = InputBox("Enter the Key")
- Set objReg = New RegExp
- objReg.Pattern="^[a-zA-Z][0-9]{3}$" 'If you want only the capital letters, you can rewrite the pattern as ^[A-Z][0-9]{3}$
- If Not objReg.Test(strVar) Then
- MsgBox "Input is incorrect!!!"
- Else
- MsgBox "Input is correct"
- End If
- Set objReg = Nothing
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement