Thread: Form
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default Form

Hi Bill,

Try:

For i = 1 to 10
Userform1.Controls("Textbox" & i).Text = ""
Next i



---
Regards,
Norman



"Bill" wrote in message
k.net...
Hello,
I have a form that contains a number of text boxes. I would like to add a
loop that sets each text box to an initial value such as 1. Each textbox
is cleverly names TextBox1, TextBox2. I tried a loop like:

For i = 1 to 10
userform1.textbox " & i = 1
next i

But that doesn't work. Any help?

Thanks.

Bill