Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
VBA doesn't support control arrays, so the syntax TextBox1(i) is all wrong.
Try the following Dim Ctrl As MSForms.Control For Each Ctrl In frmOrderForm.Controls If TypeOf Ctrl Is MSForms.Textbox Then Ctrl.Text = vbNullString End If Next Ctrl -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com (email address is on the web site) "Trevor Williams" wrote in message ... I'm trying to reset all textboxes on a form to a zero string before the form initializes, but without any success - what am I doing wrong? For i = 1 To 15 frmOrderForm.TextBox1(i).Text = "" Next i Thanks - Trevor |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reset userform | Excel Programming | |||
Keeping Textbox Values After Reopening Userform | Excel Programming | |||
Userform Reset After Scrolling | Excel Programming | |||
Adding up values of textbox in Userform | Excel Programming | |||
UserForm TextBox to ActiveSheet TextBox over 256 characters | Excel Programming |