|
-
Feb 20th, 2002, 05:22 AM
#1
Thread Starter
Member
How do l change a textbox's label
Depending on what is put in a textbox l want to change the label, (what appears in the window) of a second text box. Is this possible?
-
Feb 20th, 2002, 05:28 AM
#2
not quite sure what that means... but i've guessed
Dim strabc as string
strabc = text1.text
select case strabc
case "":
text2.text = "empty"
case "goo goo dolls":
text2.text = "the best!!!"
case "whatever"
text2.text = "hey yo!"
end select
Is this what you meant? or could u be a bit more clear?
-
Feb 20th, 2002, 05:28 AM
#3
Try:
VB Code:
IF Something.... Then
Text2.Text = Text1.Text ' Or what ever u need to do
End IF
________
Washington dispensaries
Last edited by Bruce Fox; Aug 14th, 2011 at 04:37 AM.
-
Feb 20th, 2002, 05:41 AM
#4
Thread Starter
Member
To clarify - it's not what appears in the text box - but what appears in the text box's label
Sorry it's probably a bit lame - but I am a newbie at this!
-
Feb 20th, 2002, 06:43 AM
#5
Hyperactive Member
I didn't think Text Boxes had labels
-
Feb 20th, 2002, 06:51 AM
#6
Bouncy Member
i think he means the InputBox() function... dont you?
here's an example of what you mean...
VB Code:
Private Sub Form_Load()
Dim str As String
str = InputBox("Enter title of next input box", "Input")
InputBox "OK?", str
End Sub
-
Feb 20th, 2002, 01:32 PM
#7
Simple really,
Code:
Private Sub Text1_LostFocus()
If Text1 = "Something" Then
Label2.Caption = "Whatever"
End If
End Sub
-
Feb 20th, 2002, 06:03 PM
#8
Thread Starter
Member
Originally posted by Jethro
Simple really,
Code:
Private Sub Text1_LostFocus()
If Text1 = "Something" Then
Label2.Caption = "Whatever"
End If
End Sub
Thank you will give it a go
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
|