for loop

  toga 17:21 29 Mar 10
Locked

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
next
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.

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

VFX Oscar nominees 2017: Discover how the visual effects were created

Best alternatives to iTunes for Mac | Best music players for macOS: Free your music from the…