VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



Clear all textboxes on a form at run-time

by Found on the World Wide Web (15 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 3.0
Difficulty: Unknown Difficulty
Date Added: Wed 3rd February 2021
Rating: (4 Votes)

handy code for clearing all text box controls at run-time
so you don't have to bother doing it at design time.
https://137.56.41.168:2080/VisualBasicSource/vbworkingwithtextbox.txt

Rate Clear all textboxes on a form at run-time

'make a new form; put some textboxen on it with some text in it
'make a commandbutton
'put the next code under the Command_Click event
   Dim Control
   For Each Control In Form1.Controls
     If TypeOf Control Is TextBox Then Control.Text = ""
   Next Control

Download this snippet    Add to My Saved Code

Clear all textboxes on a form at run-time Comments

No comments have been posted about Clear all textboxes on a form at run-time. Why not be the first to post a comment about Clear all textboxes on a form at run-time.

Post your comment

Subject:
Message:
0/1000 characters