Private Sub Command1_Click() Dim tempCon As Control For Each tempCon In Me.Controls If TypeName(tempCon) = "TextBox" Then tempCon.Text = "1" End If Next End Sub
dim ctrl as controlfor each ctrl in contorls if typeof ctrl is textbox then ctrl.text=1 end if next
Dim tempCon As Control
For Each tempCon In Me.Controls
If TypeName(tempCon) = "TextBox" Then
tempCon.Text = "1"
End If
Next
End Sub
if typeof ctrl is textbox then
ctrl.text=1
end if
next