G
Guest
If I create more than 1 combo box following the above KB
article, the second box will not work.
Can some please look at the 2 codes and tell me what I am
doing wrong?
Thanks
CODE1 - THIS WORKS
___________________________________
Private Sub ComboBox1_Change()
ActiveDocument.FormFields("Text1").Result =
ComboBox1.Value
End Sub
Private Sub Cmdclose_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
ComboBox1.ColumnCount = 1
'Load data into ComboBox
ComboBox1.List() = Array("The defendant is before the
Court for review.", "To inform the Court of the
defendant's violations of probation.", "The defendant is
before the Court for sentencing after revocation.")
End Sub
Sub gocombobox()
frmcombo.Show
End Sub
_________________________________
CODE 2 DOES NOT WORK
Private Sub ComboBox2_Change()
ActiveDocument.FormFields("Text2").Result =
ComboBox2.Value
End Sub
Private Sub Cmdclose_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
ComboBox2.ColumnCount = 1
'Load data into ComboBox
ComboBox2.List() = Array("Review Hearing", "Violation
hearing")
End Sub
Sub gocombobox2()
ReasonHearing.Show
End Sub
The VBA window keeps going back the "ReasonHearing.Show".
Please someone help
article, the second box will not work.
Can some please look at the 2 codes and tell me what I am
doing wrong?
Thanks
CODE1 - THIS WORKS
___________________________________
Private Sub ComboBox1_Change()
ActiveDocument.FormFields("Text1").Result =
ComboBox1.Value
End Sub
Private Sub Cmdclose_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
ComboBox1.ColumnCount = 1
'Load data into ComboBox
ComboBox1.List() = Array("The defendant is before the
Court for review.", "To inform the Court of the
defendant's violations of probation.", "The defendant is
before the Court for sentencing after revocation.")
End Sub
Sub gocombobox()
frmcombo.Show
End Sub
_________________________________
CODE 2 DOES NOT WORK
Private Sub ComboBox2_Change()
ActiveDocument.FormFields("Text2").Result =
ComboBox2.Value
End Sub
Private Sub Cmdclose_Click()
Unload Me
End Sub
Private Sub UserForm_Initialize()
ComboBox2.ColumnCount = 1
'Load data into ComboBox
ComboBox2.List() = Array("Review Hearing", "Violation
hearing")
End Sub
Sub gocombobox2()
ReasonHearing.Show
End Sub
The VBA window keeps going back the "ReasonHearing.Show".
Please someone help