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
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