G
Guest
I have a listbox control and I added some colors from which the user can select a color to change the background color of a couple of labels at once
The code I have looks like this
Me.ListBox1.Items.Add("Blue"
Me.ListBox1.Items.Add("White"
Me.ListBox1.Items.Add("Red"
Dim SeeColors = "Color" + "." + ListBox1.SelectedItem.tex
Me.ListBox1.BackColor = SeeColor
Just to try it out I set the background color of the listbox to the selected color
If the user selected red, as far as I know (which obviously is not very far) at this point Me.ListBox1.BackColor is suppose to contain "Color.Red
When I run the program VB.net error message says "the object variable is not set
Any suggestions
The code I have looks like this
Me.ListBox1.Items.Add("Blue"
Me.ListBox1.Items.Add("White"
Me.ListBox1.Items.Add("Red"
Dim SeeColors = "Color" + "." + ListBox1.SelectedItem.tex
Me.ListBox1.BackColor = SeeColor
Just to try it out I set the background color of the listbox to the selected color
If the user selected red, as far as I know (which obviously is not very far) at this point Me.ListBox1.BackColor is suppose to contain "Color.Red
When I run the program VB.net error message says "the object variable is not set
Any suggestions