I have two comboboxes on my worksheet. I need to get the value of both of those so that I may set a cell equal to a certain value.
The code I wrote so far is not correct, but I do not understand why:
Sub ALMacro()
If ComboBox3 = "Alabama" And ComboBox4 = "D.O.E. 1605(b)" Then Range("C11").Value = 5
End Sub
I have already added Alabama and D.O.E. 1605(b) to the correct ComboBoxes using the AddItem "" method.
Can you help me
-GWI

Getting the Value of a ComboBox
bluexx
You probably need to use the .Text property of your ComboBox object to get the value
http://msdn2.microsoft.com/en-us/library/system.windows.forms.combobox.text.aspx
Sub ALMacro()
If ComboBox3.Text = "Alabama" And ComboBox4.Text = "D.O.E. 1605(b)" Then Range("C11").Value = 5
End Sub