Hi
I have userform containing 4 tabs (Pages). On Page 1 there are 31 textboxes each named Player1, Player 2....Player31.
On page 2 there are also 31 textboxes each named Player2_1, Player2_2....Player2_31.
I can write code so that the textboxes on page 2 have the same text as the textboxes on page 1, however it is long winded, example below:
Player2_1.Text = Player1.Text
Player2_2.Text = Player2.Text....and so on for each of the 31 text boxes.
QU. Is there a particular way of using a For....Next loop to shorten the amount of code.
Eg. Dim i as Integer
For i = 1 to 31
Player2_i.Text = Playeri.Text
Next i
The above doesn't work obviously or I wouldn't be asking. Any ideas ?
Thanks
Mosiki
I have userform containing 4 tabs (Pages). On Page 1 there are 31 textboxes each named Player1, Player 2....Player31.
On page 2 there are also 31 textboxes each named Player2_1, Player2_2....Player2_31.
I can write code so that the textboxes on page 2 have the same text as the textboxes on page 1, however it is long winded, example below:
Player2_1.Text = Player1.Text
Player2_2.Text = Player2.Text....and so on for each of the 31 text boxes.
QU. Is there a particular way of using a For....Next loop to shorten the amount of code.
Eg. Dim i as Integer
For i = 1 to 31
Player2_i.Text = Playeri.Text
Next i
The above doesn't work obviously or I wouldn't be asking. Any ideas ?
Thanks
Mosiki