Advertisement
2002C Custom Controls/ Forms/ Menus #8659

Clear all textboxes on a form at run-time

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

AI

AI Summary: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

Source Code
original-source
'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
Original Comments (3)
Recovered from Wayback Machine