I am trying to rename a module which leads to the run time error. In the below code, 'vbComp.name = moduleName', this line is causing the run time error. When I looked on it more, I found that the same module already exists and because of that it not allowing it to rename. Even though I called Remove reference, it is actually not removing the reference.. I tried Doevents, I called the remove reference code in a separate procedure as I shown below.. Still after executing the code, the module is not removed.
Some additional information. So basically this code is being called in 'a.xla' and the XLAName being passed is a different xla 'b.xla'
I have also posted the same question in StackOverFlow and VBForums.
https://stackoverflow.com/questions/...ect=1#69733375
https://www.excelforum.com/excel-pro...ml#post5587525
Bookmarks