M
Marty
Hello:
What is the correct syntax for including a variable (in this case "i") in
the name of a TextBox and/or Label?
I have a list of TextBoxes and Labels on a userform and I want to program a
reset button to change what is displayed back to the defaults. I need
something like this:
Private Sub CommandButton8_Click()
For i = 1 To 13
TextBox(i).Text = "0"
Label(i).Caption = "N/A"
Next i
End Sub
I'm getting a Sub or Function not defined error, and I know it's because the
syntax is wrong. Help is appreciated.
Thanks,
MARTY
What is the correct syntax for including a variable (in this case "i") in
the name of a TextBox and/or Label?
I have a list of TextBoxes and Labels on a userform and I want to program a
reset button to change what is displayed back to the defaults. I need
something like this:
Private Sub CommandButton8_Click()
For i = 1 To 13
TextBox(i).Text = "0"
Label(i).Caption = "N/A"
Next i
End Sub
I'm getting a Sub or Function not defined error, and I know it's because the
syntax is wrong. Help is appreciated.
Thanks,
MARTY