Link to home
Start Free TrialLog in
Avatar of marrick13
marrick13

asked on

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
Avatar of Martin Liss
Martin Liss
Flag of United States of America image

Can you give step by step instructions on how to reproduce the problem?
Set the MatchRequired property to False for the Year combo box.

Kevin
Avatar of marrick13
marrick13

ASKER

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.
ASKER CERTIFIED SOLUTION
Avatar of zorvek (Kevin Jones)
zorvek (Kevin Jones)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial