The following lines were added (+) and removed (-):
'''Simulate the way a ComboBox works on a Web Form!''' Option Explicit Private Sub cmdSubmit_Click() cboList.TextColumn = 1 txtOut.Text = "values: " & vbCrLf & vbCrLf txtOut.Text = txtOut.Text & "Employee Code = " & cboList.Text & vbCrLf cboList.TextColumn = 2 txtOut.Text = txtOut.Text & "Employee Name = " & cboList.Text & vbCrLf & vbCrLf End Sub Private Sub Form_Load() cboList.ColumnCount = 2 cboList.TextColumn = 2 cboList.ColumnWidths = "0;80" cboList.Text = "Ben Nelson" Call cboList.AddItem("EMP002", 0) cboList.List(0, 1) = "Lisa Smith" Call cboList.AddItem("EMP006", 1) cboList.List(1, 1) = "Stanley Smith" Call cboList.AddItem("EMP019", 2) cboList.List(2, 1) = "Ben Nelson" Call cboList.AddItem("EMP012", 3) cboList.List(3, 1) = "Stacy Springs" End Sub* Sets a default value in the combo box.* Hides the Employee ID from view.* When a name is selected, the employee ID value is captured.