cristianbuse / VBA-UserForm-MouseScroll

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

Use MouseScroll as an Excel Add-in #36

Closed don922 closed 5 months ago

don922 commented 5 months ago

Sorry to open this as an issue but I didn't see a way to contact you directly.

Is there any reason that you can think of that this code won't work as an Excel Add-In? I've taken a quick look at the code and I can't see anything that would cause any issues. The reason I am asking is because I like to make common reusable code like this an add-in. When you change the code you just change the add-in and every workbook that uses it gets the new code. This way you don't have to change every workbook that uses the code.

Thanks Don

cristianbuse commented 5 months ago

Hi @don922 ,

Please don't apologize. I've just enabled the Discussions in case you ever want to start any other topic.

I see no reason why to not use this as an add-in. You will have 2 options: 1) The simplest is to replace EnableMouseScroll Me calls with Application.Run "EnableMouseScroll", Me 2) Or, add the add-in file as a reference to each of your projects but this will become problematic if the add-in is not found e.g. has changed name/location