URGENT: Populating combo box with data problem

  • Thread starter Thread starter adilfinchley
  • Start date Start date
A

adilfinchley

Hi, am doing a questionnaire spread sheet which have questions an
depending on the user's answers (Yes/No) the cell beneath should b
populated with text.
What I have done is created a combo box but having difficultie
populating it with (Yes/No). I have wrote the following code in VBE bu
can not get the combo box working.
also, before the combo box I created a data validation(Yes/No) an
linked it to code similar to this (without different sub name) and i
worked fine but when I run the Micro manually from the tools men
rather than getting active from the selection list
Hope you can help.
Thanks

So here is some code I wrote for the combo box
======================================================
Private Sub ComboBox1_Change()

Dim choice1 As String

choice1 = Cells(146, "G").Value
If choice1 = "Yes" Then
Cells(147, "E") = " "
Cells(147, "F") = " "
Cells(147, "E") = "1"
Cells(147, "F") = "Red"
Else Cells(147, "E") = " "
Cells(147, "F") = " "
Cells(147, "E") = "1"
Cells(147, "F") = "White"
End If

End Su
 
Hi!

Two questions:

Are you using the ListFillRange to hold your Yes/No?

(Put Yes & No in two contiguous cells: put the address - e.g. Z1:Z2
in ListFillRange). That will get the Yes and No into the Combobox.


Are you using the LinkedCell property? (Put G146 in LinkedCell on th
combobox Properties list)

Lights up for me.

Al
 
Back
Top