Patriot2879
Well-known Member
- Joined
- Feb 1, 2018
- Messages
- 1,231
- Office Version
- 2010
- Platform
- Windows
Hi i have the code below where i am trying to clear text boxes, 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18 and 19 but i get an error on the 'For x = 10 To 19' line, please can you advice?
VBA Code:
Private Sub CommandButton3_Click()
Dim x As Integer
For x = 1 To 7
For x = 10 To 19
Me.Controls("textbox" & x).Value = ""
Next x
End Sub