Ok, I have a form with about 750 buttons and i want to be able to refer to a button based on a string.
For example, instead of writing...
Button1_A.BackColor = Color.ForestGreen
I want to write...
Dim Q_No As String
Dim Btn_Type As String
Dim Btn As String
Private Sub Another_Button_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Another_Button.Click
Q_No = "1"
Btn_Type = "A"
Btn = "Button" & Q_No & "_" & Btn_Type
Btn.BackColor = Color.ForestGreen()
End Sub
But i just get the error message "'BackColor' is not a member of 'String'"