User Form crashing after exiting a ComboBox set on MatchRequired = True while using Jaafar Tribak's scroll with mouse wheel inside ComboBox code

AndreTor

New Member
Joined
Nov 24, 2022
Messages
1
Office Version
  1. 365
  2. 2021
  3. 2019
  4. 2016
  5. 2013
  6. 2011
  7. 2010
  8. 2007
  9. 2003 or older
Platform
  1. Windows
As the title suggests,

I ran into this issue. I'm referring to this code posted on this thread: ComboBox Scroll with Mouse wheel

More specifically, the error occurs when I select a value via the drop-down list inside the Combo Box, then delete it and exit it.

It returns "Invalid property value", Run-time error '-2147467259 (80004005)', Unspecified error

If I try to debug it, it leads me to Line 121, Col 1 of Jaafar's code (ComboBox.SetFocus)

If you can't solve this, I'd like an alternative similar to the following:

Setting MatchRequired = False, and then coding that if you type a value not present in the list of said Combo Box and then exit the ComboBox it, it returns a string of my choice (i.e. "Please enter a value from the list").

Thanks.
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.

Forum statistics

Threads
1,223,885
Messages
6,175,184
Members
452,615
Latest member
bogeys2birdies

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top