View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Compiled Application Crashes

There is very little benefit to compiling code in VBA. Normally compiled code
will run faster but not in VBA. What compiling does however is it increases
the file size. So your compiled file will take longer to load since it is
marginally larger but it will not run any faster. Take a look at this site
where you can get a decomipler utility...

http://cpap.com.br/orlando/VBADecompilerMore.asp
--
HTH...

Jim Thomlinson


" wrote:

Symptom: Compiled application crashes while same uncompiled
application works OK.
Platform: XL 2003 on winXP

I have an XL application with about 150 Subs and 1500 lines of code.
All the subs are accessed via a custom CommandBar, created by code.
It has been working fine for a long time.

Recently, I made a small update, involving some cells and just one
sub. I compiled and saved the application.
The application started crashing, when another sub was called - not
the modified one.

To my surprise, I discovered, that if I saved the application without
compiling it, it works!

I tried VBA Code Cleaner, and same pattern persists. The compiled
version crashes while the uncompiled version works.

Any idea?


Thanks
Dovy