VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Input box

by Joseph Varghese (2 Submissions)
Category: Coding Standards
Compatability: Visual Basic 5.0
Difficulty: Intermediate
Date Added: Wed 3rd February 2021
Rating: (3 Votes)

Hello friends i dont know how many people know this but not all,,this tutorial will let you know how to handle cancel button on input box
most of them dose this by checking the length of the value returned by the input box even though it works it is not the proper way todo it check ot this material Have fun...

Rate Input box

Private Sub Command1_Click()
Dim str1 as String
str1=Inputbox("Enter some thing")
If Strptr(str1)<>0 then
'code for click of ok button
Msgbox "OK CLICKED"
Elseif Strptr(str1)=0 then
'code for click of cancel button
Msgbox "CANCEL CLICKED"
Endif
End Sub

Download this snippet    Add to My Saved Code

Input box Comments

No comments have been posted about Input box. Why not be the first to post a comment about Input box.

Post your comment

Subject:
Message:
0/1000 characters