mlhaufe

Prompt Empty/Cancel

Nov 22nd, 2011
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 'Reference: <http://www.visualbasicscript.com/fb.ashx?m=95001>
  2. Dim name : name = InputBox("Please enter username:","Enter username")
  3.  
  4. If TypeName(name) = "Empty" Then
  5.     MsgBox "You Hit Cancel"
  6. Else
  7.     If Len(Trim(name)) = 0 Then
  8.         MsgBox "You Entered Nothing"
  9.     Else
  10.         MsgBox ("Your username is:" & name)
  11.     End If
  12. End If
Advertisement
Add Comment
Please, Sign In to add comment