Not far into programming and just joined this forum of mighty company so this is a silly question, but what is the best way to clear textboxes in VB.Net and what is the diff
Add this code in the Module :
Public Sub ClearTextBoxes(frm As Form)
For Each Control In frm.Controls
If TypeOf Control Is TextBox Then
Control.Text = "" 'Clear all text
End If
Next Control
End Sub
Add this code in the Form window to Call the Sub routine:
Private Sub Command1_Click()
Call ClearTextBoxes(Me)
End Sub