Have set up a User form in Excel 2007. In this form have added a Combo box for user to be able to select info from a drop down list in the Combo box. How can I prevent manual keying into this combo box.
2 option ideas:
1) If user attempt to key into the box engage MsgBox("Must Select from List") & then clear entered info in box before allow next user action.
2) Simply not allow any entry into this box, so user either has to select from the list or hit cancel or enter to close the user form with no action taken.
Is there a property for the combo box that can accomplished this or does this need to be done with VBA? Your ideas appreciated..... R
Current Combo Box Code:
Private Sub ComboBox1_Change()
Dim varUF01 As Variant
varUF01 = UserForm1.ComboBox1.Value
Sheets("Seamless").Select
Dim iRow As Integer, iCol As Integer
For iCol = 2 To 2
For iRow = 6 To 456
If Cells(iRow, iCol).Value = "" Then
Cells(iRow, iCol).Select
ActiveCell.Value = varUF01
Call CommandButton1_Click ' (Code is Unload Me)
Exit Sub
End If
Next
Next
MsgBox "FULL"
End Sub
2 option ideas:
1) If user attempt to key into the box engage MsgBox("Must Select from List") & then clear entered info in box before allow next user action.
2) Simply not allow any entry into this box, so user either has to select from the list or hit cancel or enter to close the user form with no action taken.
Is there a property for the combo box that can accomplished this or does this need to be done with VBA? Your ideas appreciated..... R
Current Combo Box Code:
Private Sub ComboBox1_Change()
Dim varUF01 As Variant
varUF01 = UserForm1.ComboBox1.Value
Sheets("Seamless").Select
Dim iRow As Integer, iCol As Integer
For iCol = 2 To 2
For iRow = 6 To 456
If Cells(iRow, iCol).Value = "" Then
Cells(iRow, iCol).Select
ActiveCell.Value = varUF01
Call CommandButton1_Click ' (Code is Unload Me)
Exit Sub
End If
Next
Next
MsgBox "FULL"
End Sub