for loop

  toga 17:21 29 Mar 10

Hello, I am using a form in excell 97 and I am trying to use a for loop (via a user form) to loop through a number of text boxes; altering the value of each text box.

Private Sub Command1_Click()
for i = 1 to 3
me.textbox(i).value = i
End Sub

The textboxes are named txtbox1, txtbox2 and txtbox3. I was trying to use i to alter the name. I get a message stating that an object is not declared.

I have also looked to see if I could set the index property to 1, 2 and 3 respectively but can't find where to do this.

Can anyone help?

Many thanks

  bremner 19:48 29 Mar 10

This is much more than an "Absolute Beginners" type question.

If you don't get a response after a period you may be better closing this thread and re-posting in the Helproom.

  ronalddonald 12:17 02 Apr 10

give it about a week then post this same question on the Helproom.

  Chris the Ancient 11:28 03 Apr 10

This question does also appear in the Helproom.

This thread is now locked and can not be replied to.

Surface Pro 5 News - release date, UK price, features, specs

Microsoft Surface Studio hands-on review: the iMac killer is here

Best Mac antivirus 2017