When I have this code in UserForm_Initialize
Dim i As Integer
'clear textboxes
For i = 1 To 30
Set TextBoxArray(i) = Controls("TextBox0" & i)
TextBoxArray(i).Text = ""
TextBoxArray(i).Value = ""
Next i
It does not clear the textboxes.
but when I add a messagebox, it clears them.
Dim i As Integer
'clear textboxes
For i = 1 To 30
MsgBox(i)
Set TextBoxArray(i) = Controls("TextBox0" & i)
TextBoxArray(i).Text = ""
TextBoxArray(i).Value = ""
Next i
Excel 2003 and Windows XP
Bookmarks