Closed cleitonjohnson closed 1 year ago
The VBA UserForm MouseScroll_DEMO run normally. If create new userform in Demo run normally
Hi @cleitonjohnson ,
Don't copy paste the code. Clone the repository or dowload the zip file and then import the modules.
The file imported from the zip folder works.
But interesting that copied from the DEMO file does not work.
Which magic has the most inside that imported file there? :-D
Hi @cleitonjohnson ,
VB* modules have hidden attributes that you can only see in a text editor. For example the top 9 lines in the class module are clearly visible as text but when you import the module, you won't see them in the IDE. This is unfortunately one of the many issues with the VBA editor. So, copy-paste does not work in this case because you need the special Attribute VB_PredeclaredId = True
but when copy-pasting it gets defaulted to False
.
if copy and paste the code![image](https://user-images.githubusercontent.com/68911422/206867331-16a5c1bb-20a0-4dcf-8c32-fcf3ae2c7769.png)
if import the file![image](https://user-images.githubusercontent.com/68911422/206867381-3eac6beb-4c04-47c4-943a-81868b3e5b5c.png)