vbaDeveloper icon indicating copy to clipboard operation
vbaDeveloper copied to clipboard

problem installing (Excel 2010)

Open mkaut opened this issue 10 years ago • 5 comments

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"..

mkaut avatar Nov 27 '14 08:11 mkaut

I have a similar problem with Excel 2010 (Pro Plus). Nothing happens at all when I try to run testImport().

Boggin avatar Dec 01 '14 10:12 Boggin

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.

MCallas avatar Dec 10 '14 16:12 MCallas

Hello guys! I have the same bug. But you can fix it by your self:

  1. ThisWorkbook.sheet is not module, a class or worksheet. It's record of workbook instance and you have to copy-paste it to local workbook instance look screenshot
  2. All other cls file are imported incorrectly in vbe. I suppose it's MS bug. You can this
  • create Class1
  • export Class1
  • copy paste anyone cls into Class1
  • rename this file to string Attribute VB_Name
  • import it

And it'll be imported correctly. This is mine example https://github.com/mcgr0g/vbaDeveloper/releases/tag/v1.0 Good luck!

mcgr0g avatar Dec 15 '14 12:12 mcgr0g

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.

hilkoc avatar Dec 17 '14 22:12 hilkoc

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

gberl001 avatar Jan 21 '15 18:01 gberl001