cristianbuse / VBA-UserForm-MouseScroll

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

Crashes with no error message #22

Closed Cosmic-78 closed 1 year ago

Cosmic-78 commented 1 year ago

After Office updated today (2023/01/13), attempting to run any form which has the mouse scroll enabled causes Excel to completely crash and reload with no error message. Best I can tell, the crash seems to happen when this line is called m_hHookMouse = SetWindowsHookEx(WH_MOUSE, AddressOf MouseProc, 0, GetCurrentThreadId()) in the HookMouse() function. Prior to the updates, the code ran fine. The version information on my copy of Excel is Microsoft® Excel® for Microsoft 365 MSO (Version 2212 Build 16.0.15928.20196) 64-bit running on Windows 10 64 Bit Enterprise (Version 1909 Build 18363.2274), i7 processor with 32GB ram

cristianbuse commented 1 year ago

@Cosmic-78 I was able to upgrade to version 2208 which is the latest version that my subscription has. Unfortunately, I was not able to replicate the issue. I will leave this issue open for now and I will try to get my hands on version 2212.

You could try this:

This should cover the case where code got corrupted by the edit-and-continue feature, since it rewrites chunks of p-code on the fly.

Cosmic-78 commented 1 year ago

I followed the steps above and imported copies of the latest version and it appears to function just fine now, so I've closed this issue. Thank you for taking the time to help.