I’m making a little app for work and I’m really new to programming so forgive me if this is a newbish question.
What I’m trying to do is skim through an array and use its values to provide control names. See the code…
[code]
Dim UtilityGroups() As String = {“Electric”, “Gas”, “Irrigation”, “Lighting”, “Water”}
Dim group As String
For Each group In UtilityGroups
If group & “FlagCheck.Checked” = True Then
Select Case group & “GroupBox.ForeColor”
Case group & “GroupBox.ForeColor” = Color.Black
group & “GroupBox.ForeColor” = Color.Yellow
Case group & “GroupBox.ForeColor” = Color.Yellow
group & “GroupBox.ForeColor” = Color.red
Case group & “GroupBox.ForeColor” = Color.Red
MessageBox.Show(group & ” has already been escalated to red.”)
End Select
End If
Next
[/code]
I know im a newb, but this seems like it should would. It works when i do something like:
[code] messagebox.show(group) [/code]
but not within a statement. Where am I going wrong?