• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 665
  • Last Modified:

Invalid Property Value message on manual entry in Excel userform combobox

I have a simple userform that builds a calender on formulas with VBA for several listboxes and a combobox (CmbYear) for selecting the year. The CmbYear combobox allows user entry, but when I enter a value and click the X to close, the Invalid Property Value message appears. It continues until I click the combobox arrow and select one of the years in the list. I shut off the X close function and added a close button, but the error still appears whenever a manual entry is made in the combo box.

I tried a few remedies found online, such as setting the listindex to 0, but that and others didn't work. I have the list max length set to 4 to prevent entry of more than 4 characters, but this doesn't prevent the error.

The file is attached. Help will be greatly appreciated.
Calendar.xlsm
0
marrick13
Asked:
marrick13
  • 2
1 Solution
 
Martin LissRetired ProgrammerCommented:
Can you give step by step instructions on how to reproduce the problem?
0
 
zorvek (Kevin Jones)ConsultantCommented:
Set the MatchRequired property to False for the Year combo box.

Kevin
0
 
marrick13Author Commented:
Click the CmbYear combobox and enter a year. You can either select the existing year and remove it or delete any of the year's digits and replace them. Then click CLOSE to get the message. In other words, the error occurs every time you manually change a year and click close. To clear the error, just select any year from the CmBYear box.

Try it with the newly attached - the previous file had year validation code that I thought I had removed.
0
 
zorvek (Kevin Jones)ConsultantCommented:
The problem is that the MatchRequired property is set to True and when you leave the control by clicking on another control, Excel is complaining that the entered value is not a match out of the drop down list.

Kevin
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now