Invalid Property Value message on manual entry in Excel userform combobox

Posted on 2012-08-12
Last Modified: 2012-08-13
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.
Question by:marrick13
    LVL 44

    Expert Comment

    by:Martin Liss
    Can you give step by step instructions on how to reproduce the problem?
    LVL 81

    Expert Comment

    by:zorvek (Kevin Jones)
    Set the MatchRequired property to False for the Year combo box.


    Author Comment

    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.
    LVL 81

    Accepted Solution

    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.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
    Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
    This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
    This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now