Pookiemeister
Well-known Member
- Joined
- Jan 6, 2012
- Messages
- 626
- Office Version
- 365
- 2010
- Platform
- Windows
I am using VBA in Excel 2010. I was wondering if there is a simple way to check to see if the value entered in the combobox matches the already populated value within the combobox.
As you can see, this combobox is populated with the values of the names of the months. What I would like to do is, if the user manually types in a month and misspells it, on exit, check and see if what they entered matches with what is in the combobox, if not display a message box.
Thank you.
Code:
Private Sub cmbMonth_Enter()
With Me.cmbMonth
.AddItem "January"
.AddItem "February"
.AddItem "March"
.AddItem "April"
.AddItem "May"
.AddItem "June"
.AddItem "July"
.AddItem "August"
.AddItem "September"
.AddItem "October"
.AddItem "November"
.AddItem "December"
End With
End Sub
Thank you.