Hi!

I'm currently working on a project that involve a lot of Excel files that I need to keep up to date. I'm using parts of the code that can be found here http://www.cpearson.com/excel/vbe.aspx and it works just fine, except for 2 of my modules. (I use the "Copy A Module From One Project To Another" sub)

More precisely, the code works really fine with most of my modules, but I have some modules that I can’t seem be able to touch with the code. I’ve passed through the code to see what’s happening and the weird thing is that everything seems to run just fine, except that the function seems to ignore a line. I’ve been through the code with F8 and the code goes through all normally, but when it passes on the line : .Remove .Item(ModuleName), the module isn’t removed from the Excel file. It simply ignores the command on the line while passing on it (With F8, the line turns yellow, then it goes to the next line and nothing happens). So the rest of the code continues without any errors, but the module isn’t transferred.

Please Login or Register  to view this content.
I’ll leave you some more information about the modules that can’t be transferred. Other fact, I can’t seem to be able to delete these modules with the “Deleting A Module From A Project” code.

First module with which I had problems. I’m not sure if it’s related to the content or simply a weird bug. The “Title_Show” and “Title_Hide” sub (now in the second module below) were in the first module before and I transferred them to another module, with which I started to have problem after that transfer. I changed these subs from the first module to the second to be able to edit them, but the problem creeped on both modules.

Please Login or Register  to view this content.
Part of the second module.

Please Login or Register  to view this content.
The last thing that I think that has to do something with the fact that I can't transfer these modules is that I call the Title_Show sub in the Workbook_Open part of my code. If I remove the line where I call Title_Show when the Workbook opens, I can transfer all the modules normally.

Thanks a lot for any help or insight!