View Single Post
  #18   Report Post  
Posted to microsoft.public.excel.programming
Jon Peltier Jon Peltier is offline
external usenet poster
 
Posts: 6,582
Default Managing objects in VBA ( specifically good practices with destruction)

If I encountered something like this, I would suspect some kind of
corruption. Sure, it's a lousy excuse for not knowing what's wrong, but
whatever.

I would copy the code from each module into my text editor and save a pile
of text files. I would rebuild the problematic project bit by bit to make
sure it's not a simple coding error (though I usually make complicated
errors <g). I'd go through and compile often to try to see where the
problem creeps in.

Other than this kind of brute force rebuilding of the project, I'm not sure
what to suggest.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Tom Med" wrote in message
ups.com...
And I have now discovered it crashes when I try to remove a module or
class.... so basically it is impossible to debug too.

I have updated to the latest vbe6.dll I could find on the MS website
and done everything else I know how to do and am totally out of ideas
now

On 27 Sep, 13:30, Tom Med wrote:
Sure. When I try and close a certain workbook and hence VBAProject I
get a coredump. When I try to stop the VBE execution in this project
I get a core dump. When I try and compile this project I get a core
dump. Due to the nature of these problems it is hard to narrow it
down from a project level. Although I am trying to run the modules in
this project separately to see if I can locate the exact cause.

Thanks

On 27 Sep, 13:06, "Jon Peltier"
wrote:

Could you describe the "instability"?


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -http://PeltierTech.com
_______


"Tom Med" wrote in message


roups.com...


I am having a lot of problems with VBA instability at the moment. And
I am pretty sure this is to do with the destruction of objects and
their deletion from memory. I get this instability everytime I try
to
stop the VBA or to close certain workbooks. Does anyone have any
information or resources about how VBA manages it objects? Or does
anyone know what known problems there are with certain types of
object
that could cause instabilities? Sort of like the C# problem with
structs vs classes. Are there certain things I should to to ensure
the clean removal of objects within classes?


Thanks
Tom