|
-
Apr 5th, 2009, 04:33 PM
#1
Thread Starter
Lively Member
[RESOLVED] simple if then statement help
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"
Last edited by Hack; Apr 6th, 2009 at 05:56 AM.
Reason: different question - Added RESOLVED to thread title and green resolved checkmark
-
Apr 5th, 2009, 04:43 PM
#2
Hyperactive Member
Re: simple if then statement help
Code:
Private Sub Command1_Click()
If Text1.Text = vbNullString Then
Text2.Text = "nothing"
Else
Text2.Text = "something"
End If
End Sub
-
Apr 5th, 2009, 04:47 PM
#3
Thread Starter
Lively Member
Re: simple if then statement help
Thank You Thank You Thank You!!!!!!!!!!!!!
-
Apr 5th, 2009, 07:12 PM
#4
Re: simple if then statement help
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|