Hi.
I have the following code, which when executed will clear all text boxes on a particular form. However, I have more than one form which will need this feature.
How would I implement this as a function so that I can save it in a module?
Ideally I would like to call it like this..
Any help is greatly appreciated.
I have the following code, which when executed will clear all text boxes on a particular form. However, I have more than one form which will need this feature.
VB.NET:
Dim ctrl As Control
For Each ctrl In Controls
If TypeOf ctrl Is TextBox Then ctrl.Text = ""
Next ctrl
How would I implement this as a function so that I can save it in a module?
Ideally I would like to call it like this..
VB.NET:
ClearFields(FormName)
Any help is greatly appreciated.