You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to import a class, I expect it to show up with the same name, and subsequent calls will reference the appropriate class, even if I am overwriting a class that was currently in use.
Current Behavior
When I tried to import "fredDeveloper_ModuleManager", it resulted in "fredDeveloper_ModuleManager1" and subsequent scripts thus didn't find the correct reference.
Steps to Reproduce
Run this script
SubFredSourceControl()
Dim ModuleManager AsNew fredDeveloper_ModuleManager
With ModuleManager
.Directory = ThisWorkbook.Path & "\Source Code"
.Import "fredDeveloper_ModuleManager"End WithEnd Sub
Subsequent runs will not compile, because it overwrote fredDeveloper_ModuleManager as fredDeveloper_ModuleManager1
Possible Solution
Either prevent this behavior, or find a way to write as a second class, delete the first, and rename the second one.
Environment
Microsoft Office Version: 365
Program: Excel
Operating System: Windows 10
Other Relevant Information: None
The text was updated successfully, but these errors were encountered:
The workaround is to first remove the class module in question, end code execution and then execute (from a secondary procedure) the module import. This is needed because VBA needs to update internally the remaining files in the project, after module elimination, and it does so only when the code execution stops. Thus any module update mechanism needs to be in 2 parts: first, removal of target modules and then adding updated modules.
Expected Behavior
When I try to import a class, I expect it to show up with the same name, and subsequent calls will reference the appropriate class, even if I am overwriting a class that was currently in use.
Current Behavior
When I tried to import "fredDeveloper_ModuleManager", it resulted in "fredDeveloper_ModuleManager1" and subsequent scripts thus didn't find the correct reference.
Steps to Reproduce
Possible Solution
Either prevent this behavior, or find a way to write as a second class, delete the first, and rename the second one.
Environment
Microsoft Office Version: 365
Program: Excel
Operating System: Windows 10
Other Relevant Information: None
The text was updated successfully, but these errors were encountered: