What's wrong during VBA project compilatrion?

  • Thread starter Thread starter Levan Jgarkava
  • Start date Start date
L

Levan Jgarkava

Hi!

I've got a question: Is there any size limitations on VBA Project?
Situation: I'm creating VBA classes and modules in MS Excel 2000 (9.0.2812)
and after some additions(no matter what) I can't
compile VBA project. There's an exception error signature:
 
Hi
have you tried exporting this code and importing it in a new workbook?
If this does helpt maybe your current workbook is corrupt?
 
There are size limits, but you're unlikely to hit them. Compilation errors
are usually coding bugs that the compiler can't deal with, in my experience
most commonly relating to procedure declarations. Try running the project
without compiling and test thoroughly ... the bad code usually shows up
pretty quickly.
 
Hi
have you tried exporting this code and importing it in a new workbook?
If this does helpt maybe your current workbook is corrupt?
A was coding in VB6, then I've created empty Excel Spreadsheet and imported
a code as VBA project and then tried to compile but there was Excel crush. I
tried to delete one function and code was compiled successfully, then I
tried to uncomment this function and comment other function. code was
compiled successfully, but when I tried to uncomment both functions, excell
crashed down :( (I've tried also with another functions and the same thing
happened)...
 
Hi,
There are size limits, but you're unlikely to hit them. Compilation errors
are usually coding bugs that the compiler can't deal with, in my experience
most commonly relating to procedure declarations. Try running the project
without compiling and test thoroughly ... the bad code usually shows up
pretty quickly.
It doesn't seems as code problem. It's invariant to code content, but
depends on code size...
here's my answer to another respondent:
A was coding in VB6, then I've created empty Excel Spreadsheet and imported
a code as VBA project and then tried to compile but there was Excel crush. I
tried to delete one function and code was compiled successfully, then I
tried to uncomment this function and comment other function. code was
compiled successfully, but when I tried to uncomment both functions, excell
crashed down :( (I've tried also with another functions and the same thing
happened)...


Best Regards,
Levan Jgarkava
 
The problem is that any changes to sub names or additions
that have cause to change sub names will eventually stop
working as the original sub names are part of the modules
thingy structure. To fix, copy and paste all code into a
new module. This will reset the module thingy structure.
In future, Name all of your objects before inserting code.
Don't use the default names as a macro.


regards
Mark
 
Your description makes it sound very much like a coding problem. Try
creating a second VBA project, copy the modules and functions bit-by-bit and
try recompiling as you go. I think you'll find that these extra functions
have something funny about their declarations; or as Frank suggested, you've
got a corrupt module.
 
What happens if you move one of the functions into a separate module
and 'uncomment' both? Does XL still crash during compilation?

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top