Open mkaut opened 9 years ago
I have a similar problem with Excel 2010 (Pro Plus). Nothing happens at all when I try to run testImport().
Same error as mkaut. I'm using Excel 2010. The .cls modules are importing into the regular Modules container instead of the Class Modules container and the ThisWorkbook.sheet.cls doesn't import at all. The Private WithEvents App As Application line in the EventListener.cls also fails because the .cls modules are in Modules and not Class Modules. It does no good to move them manually because the import feature deletes and re-imports the objects into the one Modules container.
Hello guys! I have the same bug. But you can fix it by your self:
And it'll be imported correctly. This is mine example https://github.com/mcgr0g/vbaDeveloper/releases/tag/v1.0 Good luck!
This issue is also present in excel 97. The problem is on this line: vbaProject.VBComponents.Import filePath
For some reason it does not work as it should. Maybe there is some setting or configuration that needs to be enabled? Any tips or ideas for a workaround are welcome.
I can't seem to find anything that would cause this that we might have direct control over. An ugly but functional work around would be to add a class object and then transfer the code using fso.... but I'm not sure if anyone is ambitious enough to do it, I would but I have no time.
Here is a link for someone who has done it in their Maven implementation. They actually specifically state that the class modules must be done this way so maybe this is the only way. http://stackoverflow.com/questions/704759/source-control-of-excel-vba-code-modules
I have tried to follow the installation instructions (twice), but when I come to step 9 (running testImport), the routine eventually crashes with error message "Compile error: Expected: end of statement", pointing to the first line of "Custom Actions". It looks like Excel is trying to interpret CustomActions as a VBA module and therefore does not understand the first line, "VERSION 1.0 CLASS"..