We help IT Professionals succeed at work.

clear text boxs in vb programming

afeistel2
afeistel2 asked
on
Medium Priority
193 Views
Last Modified: 2012-06-21
I am currently working on a program and I want to make it where the output text box clears every time there is a change in the input text box how can I do this?
Comment
Watch Question

High School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009
Commented:
What is your environment here?  VBA, VB6, VB.Net?...

Here's a simple VB.Net example:
    Private Sub txtInput_TextChanged(sender As System.Object, e As System.EventArgs) Handles txtInput.TextChanged
        txtOutput.Clear()
    End Sub

Open in new window

Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009

Commented:
Here's a VBA/VB6 example:
Private Sub txtInput_Change()
    txtOutput.Text = ""
End Sub

Open in new window

Author

Commented:
I'm using vb 2010 Express.
Mike TomlinsonHigh School Computer Science, Computer Applications, Digital Design, and Mathematics Teacher
CERTIFIED EXPERT
Top Expert 2009

Commented:
Then the first example should be helpful.  It requires two TextBoxes, one called "txtInput" and the other called "txtOutput".  Just place that code into the form.
Martin LissSocial distance - Don't touch your face - Wash your hands for 20 seconds
CERTIFIED EXPERT
Most Valuable Expert 2017
Distinguished Expert 2018

Commented:
This question has been classified as abandoned and is closed as part of the Cleanup Program. See the recommendation for more details.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.