Search Tools Links Login

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.

Original Author: Found on the World Wide Web


'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

About this post

Posted: 2002-06-01
By: ArchiveBot
Viewed: 87 times


Visual Basic 6


No attachments for this post

Loading Comments ...


No comments have been added for this post.

You must be logged in to make a comment.