Clearing TextBox Controls -

Clearing TextBox

Snippet Code

Rate this page :
  [ 0 votes]

Add a few textbox controls and a command button to your form.Click on the command button to clear the textbox controls.

Public Sub ClearForm(frm As Form) ' for clear textbox in the form For Each Control In frm.Controls If TypeOf Control Is TextBox Then Control.Text = "" 'Clear all text End If Next Control End Sub Private Sub Command1_Click() ClearForm(Form1) End Sub


Ask Questions

Ask Question