cristianbuse / VBA-UserForm-MouseScroll

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

Run-time error 6 #35

Closed don922 closed 7 months ago

don922 commented 7 months ago

I am using your VBA-UerForm-MouseScroll in Excel from Office 365 64-bit. BTW, I love this tool!

Strange issue here. I have a text box on a form. I load data into the text box and scrolling works fine. If the text box is empty I can move the mouse wheel and nothing happens since there is nothing to scroll. However, if there is one line of data that includes a CRLF in the textbox when I move the mouse wheel, I get an error in TBoxScrollY at line 861. A single line of text with no CRLF at the end does not produce the error.

Dim topLine As Long: topLine = startLine - (startY - minY) / hmPerLine

I get the following

"'Run-time error '6':"

"Overflow"

Let me know if you need any additional information.

Thanks Don

cristianbuse commented 7 months ago

Many thanks @don922 for both feedback and the kind words!

The last commit should fix this issue.

don922 commented 7 months ago

That fixed it. Thanks.

Strange issue.

Don


From: Cristian Buse @.> Sent: Tuesday, March 26, 2024 6:41:13 AM To: cristianbuse/VBA-UserForm-MouseScroll @.> Cc: don922 @.>; Mention @.> Subject: Re: [cristianbuse/VBA-UserForm-MouseScroll] Run-time error 6 (Issue #35)

Closed #35https://github.com/cristianbuse/VBA-UserForm-MouseScroll/issues/35 as completed.

— Reply to this email directly, view it on GitHubhttps://github.com/cristianbuse/VBA-UserForm-MouseScroll/issues/35#event-12247873009, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATBMZI7PPUMT3VESZRSIGQ3Y2E7DTAVCNFSM6AAAAABFGHVW52VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJSGI2DOOBXGMYDAOI. You are receiving this because you were mentioned.Message ID: @.***>