-
Notifications
You must be signed in to change notification settings - Fork 2
Trying to Import Classes In Use Causes Incremental Naming #25
Copy link
Copy link
Open
Description
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
- Run this script
Sub FredSourceControl()
Dim ModuleManager As New fredDeveloper_ModuleManager
With ModuleManager
.Directory = ThisWorkbook.Path & "\Source Code"
.Import "fredDeveloper_ModuleManager"
End With
End 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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working