VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



'How to use the Input box and trap the Cancel Button ClickOr whether the user left it blank.Submi

by Rajesh Vadakkencherry (1 Submission)
Category: String Manipulation
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 21st April 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

'How to use the Input box and trap the "Cancel Button Click"Or whether the user left it blank.Submitted by Rajesh.S, 2/75,

Rate 'How to use the Input box and trap the Cancel Button ClickOr whether the user left it blank.Submi



'email:[email protected]
'How to use the Input box and trap the "Cancel Button Click"
'Or whether the user left it blank.
Dim str As String
str = InputBox("Enter something text or number.", "Title", "Hello")
If str = "" Then
MsgBox "Nothing was entered on the inputbox" & vbCrLf & "Or you pressed the Cancel Button"
Else
MsgBox str
End If

Download this snippet    Add to My Saved Code

'How to use the Input box and trap the Cancel Button ClickOr whether the user left it blank.Submi Comments

No comments have been posted about 'How to use the Input box and trap the Cancel Button ClickOr whether the user left it blank.Submi. Why not be the first to post a comment about 'How to use the Input box and trap the Cancel Button ClickOr whether the user left it blank.Submi.

Post your comment

Subject:
Message:
0/1000 characters