Inputbox Question



Hi!

I want to control my input not to accept null or no value upon clicking OK
button. Since Inputbox function accepts input, I use it but upon clicking
Cancel button, the msgbox error also appear. I have attached my script for
you to check out.

Private Sub cmdAdd_Click()
strInput = Trim(InputBox("Enter Name: ", "Append Name"))
If strInput = "" Then
MsgBox ("Null not allowed... Please try again"), vbCritical, "Error
Message"
Else
.
statements
.
.
.
End If
End Sub

Hoping for your response.


regards,
Me


.


Loading