Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem installing (Excel 2010) #1

Open
mkaut opened this issue Nov 27, 2014 · 5 comments
Open

problem installing (Excel 2010) #1

mkaut opened this issue Nov 27, 2014 · 5 comments

Comments

@mkaut
Copy link

mkaut commented Nov 27, 2014

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

@Boggin
Copy link

Boggin commented Dec 1, 2014

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

@MCallas
Copy link

MCallas commented Dec 10, 2014

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.

@mcgr0g
Copy link

mcgr0g commented Dec 15, 2014

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:/mcgr0g/vbaDeveloper/releases/tag/v1.0
Good luck!

@hilkoc
Copy link
Owner

hilkoc commented Dec 17, 2014

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.

@gberl001
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants