cristianbuse / VBA-UserForm-MouseScroll

Use the Mouse Scroll Wheel to scroll VBA UserForms and Controls
MIT License
70 stars 12 forks source link

Runtime Error '5', Bypasses Error Handling Code #46

Closed OnwardCincinnati closed 1 week ago

OnwardCincinnati commented 1 month ago
Screenshot 2024-07-28 182246

I have no idea what happened. Everything was working fine until today, it just stopped. I get a runtime error code 5 and it stops at the same line every time.

I don't know why it's disregarding the error handling right above it.

I've uninstalled LogiOptions+, x-mouse (it used to work with it).

' 'Returns a boolean indicating if a Collection has a specific key 'Parameters: ' - coll: a collection to check for key ' - keyValue: the key being searched for 'Does not raise errors ' Private Function CollectionHasKey(ByVal coll As Collection _ , ByVal keyValue As String) As Boolean On Error Resume Next coll.item keyValue <------------------------------------------ This Line CollectionHasKey = (Err.Number = 0) On Error GoTo 0 End Function

cristianbuse commented 1 month ago

Hi @OnwardCincinnati ,

Please check your error settings. In the VB Editor (VBE) go to Tools >> Options and then in the new pop-up dialog go to the General tab. You should have the Error trapping set to 'Break on Unhandled Errors'.

image

cristianbuse commented 2 weeks ago

@OnwardCincinnati Hi! Any updates on this?