G
Guest
I am attempting to use the above article to work around
the 50 character limitation in the form field combo box.
However, when I create the combo box from scratch in VBA
it works great. However, I am running into problems when
I need to create another combo box.
Here are the 2 codes:
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
NEXT CODE -----------------------------------
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
_________________________________
The first code does not work but the second one does.
Please help.
the 50 character limitation in the form field combo box.
However, when I create the combo box from scratch in VBA
it works great. However, I am running into problems when
I need to create another combo box.
Here are the 2 codes:
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
NEXT CODE -----------------------------------
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
_________________________________
The first code does not work but the second one does.
Please help.