I need help with a very simple if/then statment
i need:
when i click command1 do this\/
if text1 HAS text then text2.text = "text"
if text1 DOES NOT have text then text2.text = "none"
Printable View
I need help with a very simple if/then statment
i need:
when i click command1 do this\/
if text1 HAS text then text2.text = "text"
if text1 DOES NOT have text then text2.text = "none"
:)Code:Private Sub Command1_Click()
If Text1.Text = vbNullString Then
Text2.Text = "nothing"
Else
Text2.Text = "something"
End If
End Sub
Thank You Thank You Thank You!!!!!!!!!!!!!
You may want to check for useless space bar presses:
Code:If Trim(Text1.Text) = vbNullString Then
Text2.Text = "text"
Else Text2.Text = "none"
End If