I want to use something like this:
For i = Forms.Count - 1 To 1 Step -1
Unload Forms(i)
Next
Is there a way to so this with all the textbox controls instead of forms?
Printable View
I want to use something like this:
For i = Forms.Count - 1 To 1 Step -1
Unload Forms(i)
Next
Is there a way to so this with all the textbox controls instead of forms?
Option Explicit
Private Sub Form_Load()
Dim ctl As Control
For Each ctl In Form1.Controls
If TypeOf ctl Is TextBox Then
ctl.Text = ""
End If
Next
End Sub
Many thanks! This is exactly what I was looking for.