OK, there is your problem then.
You have some poor code with lots of errors and you will have to fix them
all.
Make sure you always have Option Explicit by doing in the VBE:
Tools, Options, Editor, tick Require Variable Declaration.
RBS
Well I have fixed all the errors I can find, but now when I hit the
compile button excel crashes. What is causing the crash now heaven
only knows. As there are thousands of lines of code it is hard to
know where to start from.
The new code that I have introduced has been more OO based that was
used before. But as in VBA theres is no way to control the deletion
of object my hands are tied as to "fixing errors"; it is the internals
of VBA that are causing these core dumps. Most languages you would
get some idea as to where your error was. But it seems the only way I
can debug this is by removal of chunks of code at a time and narrowing
it down this way.
This trial, error and coredump method of debugging is probably the
slowest development method I have come across, is there really no more
effective way to debug VB code, or is the language really that bad?
On 27 Sep, 12:05, "RB Smissaert" <bartsmissa...@blueyonder.co.uk>
wrote:
> OK, there is your problem then.
> You have some poor code with lots of errors and you will have to fix them
[quoted text clipped - 69 lines]
> >> >> > Thanks
> >> >> > Tom
RB Smissaert - 27 Sep 2007 12:48 GMT
I don't think the language is bad at all, but somebody (not sure it was you)
has made a mess and that will need cleaning up.
Maybe you could narrow it down by commenting out the Option Explicit
one by one and compiling.
Another option is to post the file somewhere and maybe someone will have
a crack at it.
RBS
> Well I have fixed all the errors I can find, but now when I hit the
> compile button excel crashes. What is causing the crash now heaven
[quoted text clipped - 99 lines]
>> >> >> > Thanks
>> >> >> > Tom
Tom Med - 27 Sep 2007 13:53 GMT
The only problem with that is there are thousands of lines of VBA and
I am not sure my company would like me publishing it all. Due to the
nature of the problem there is no way I can locate which module /
class has the problem or produce a summary... Unless someone knows how
to get more information from a VBE core / stack trace
Tom
On 27 Sep, 12:48, "RB Smissaert" <bartsmissa...@blueyonder.co.uk>
wrote:
> I don't think the language is bad at all, but somebody (not sure it was you)
> has made a mess and that will need cleaning up.
[quoted text clipped - 112 lines]
> >> >> >> > Thanks
> >> >> >> > Tom
RB Smissaert - 27 Sep 2007 14:06 GMT
> thousands of lines
That is nothing! I have an .xla with some 150.000 lines.
I am happy to have a look if you send the file to me.
I can assure you I won't pass it on to anybody.
RBS
> The only problem with that is there are thousands of lines of VBA and
> I am not sure my company would like me publishing it all. Due to the
[quoted text clipped - 133 lines]
>> >> >> >> > Thanks
>> >> >> >> > Tom