0

hi, i have created a program but don't know what to do. The condition is when text1.text = empty or it has no value then there would be a msgbox popping out. and for the else, there would be no msgbox popping out.

i really don't know what's the code, like sort of this

If text1.text = no value Then
msgbox ("please input value")
else
end if

can you correct this please?thanks..

6
Contributors
8
Replies
9
Views
7 Years
Discussion Span
Last Post by gms_019
1

there is no need of else ! just if

If Text1.Text = "" Then MsgBox ("Please type something !")

And don't forget, never use it with text change !

Votes + Comments
thanks
1

But what if there are SPACEs in the text box? How about using If trim(Text1.Text) = "" Then to be sure.

Votes + Comments
great!
0

it if LEN(textbox1.text) = 0 THEN Msgbox("Please...")

I repeat, "But what if there are SPACEs in the text box?

0

hi, i have created a program but don't know what to do. The condition is when text1.text = empty or it has no value then there would be a msgbox popping out. and for the else, there would be no msgbox popping out.

i really don't know what's the code, like sort of this

If text1.text = no value Then
msgbox ("please input value")
else
end if

can you correct this please?thanks..

Try this:

0

hi, i have created a program but don't know what to do. The condition is when text1.text = empty or it has no value then there would be a msgbox popping out. and for the else, there would be no msgbox popping out.

i really don't know what's the code, like sort of this

If text1.text = no value Then
msgbox ("please input value")
else
end if

can you correct this please?thanks..

try this:

if text1.Text = "" then
MsgBox("Please input Value")
Else
End if

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.