Hello,
Thank you in advance. Anonymized copy of project attached.
I have two (2) combo-boxes in the sheet labled "Analysis". The first combo-box "cmBox_SelectSection" sets the .ListFillRange property of the second combo-box, called cmbox_SelectBidItem via the following code in during the Change() event of cmBox_SelectSection so that cmbox_SelectBidItem is only populated with those items that match the Section selected in cmBox_SelectSection:
This all works fine if and until the user attempts to edit the value of cmbox_SelectBidItem. Excel immediately crashes if cmbox_SelectBidItem gets focus and the user edits the text string of the value property.
I have set the Style property of both combo-boxes to 2 - fmStyleDropDownList and added the following to the KeyPress() event for both:
The above code solved the crash except for when backspace is pressed when the value of cmbox_SelectBidItem is highlighted.
The .Value property of cmBox_SelectBidItem is used in the Click() event of cmdbtn_RetriveBidItems and to set the value of cell $C$8 in the Analysis tab. It is used nowhere else in the project.
How to I solve this? Is there a way to entirely lockout keyboard commands from affecting a combo-box? My guess is this has something to do with how I'm populating the .ListFillRange property of cmBox_SelectBidItem but I'm not sure? Is there a better way I could assign the dynamic range to populate the .ListFillRange property? Open to any suggestions.
Appreciate your time and input.
Bookmarks