Re: Need Help With Run-Time Errors

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Montana DOJ Help Desk (NoEmailReplies_at_Please.com)
Date: 10/13/04


Date: Tue, 12 Oct 2004 23:03:40 -0600

Malcolm,

You're right. I have posted this question before. The reason I did not
reply to your earlier message is that I was TRYING you're recommended
solutions. If you recall, one of your suggestions was to use Option
Explicit and declare every variable. I've now done that. I didn't return
to the newsgroup before now because I just hadn't had the time to try all of
your recommendations until yesterday. I don't work on this project 24x7. I
work a technical support line, and some nights it's quite, and other nights
I'm on the phone for the entire shift, so it's one of those things where I
get to it when I get to it.

I reposted the question because I thought that some people who might be new
to the thread may not be able to see the original message anymore. For
example, *I* can no longer see the original message on my server.

As for why certain values are being declared at the module level, that's
because they are being used in multiple subroutines. Unless there is
something extremely basic about VBA that I have missed, those variables MUST
be declared at the module level in order to pass values from one subroutine
to another. Please let me know if this is not correct.

I did try to post the values of the important variables (RangeStart,
RangeEnd, RecordNumberLength, and total document length) with my message
last night, but as I was writing up that message, I could not get the code
to crash. What can I say? Sometimes it crashes, and sometimes it doesn't.
That's the frustrating thing with this--there doesn't seem to be a common
thread between when it crashes, and when it works. It seems like the error
is generated at random.

I've even wondered if the problems are being causes by a corrupt documnet or
module. I've had another problem with the project code being unviewable,
which tends to be an indication of a corrupt module (but which can be
addressed by closing and reopening the document), so I thought that might be
part of the problem, and I wanted to rule it out before coming back to the
newgroup because if the problem was with a corrupt module, then no amount of
troubleshooting the code would help. In fact, that's another reason that I
haven't gotten back to this issue until now--I've been attacking the problem
from that angle. I researched corrupt modules, cleaned my module, put the
code into a brand new template, etc. But none of that helped, so it looks
like it's a code problem after all.

I posted a reply to Helmut that I think has finally gotten me on the right
track to solving this problem.

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."
"Malcolm Smith" <malcolm.smith@DragAndDrop.com> wrote in message
news:memo.20041012101849.2072B@mksmith.aits-uk.net...
> I'm sure we've had this before.
>
> Why are these variables declared a modular level?
> What are the values of the important variables, RangeStart, RangeEnd and
> RecordLength when it crashes?
>
> You've asked this before and I have answered the same questions which you
> haven't replied to and then you just come back a few weeks later and post
> the same thing again.
>
> Can you determine the value of these variables please then we can look
> into it a little more?
>
> - Malc



Relevant Pages

  • Re: The wicked untruths of our church leaders
    ... to declare that anyone is a human being. ... What imho would be especially unscientific would be to draw lines without ... I appear to be better acquainted with reason than you on this. ... care whether you think I'm humble or not nor do I care for your suggestion. ...
    (uk.religion.christian)
  • Re: Properties
    ... Is there any reason why this would not work and not simplify the ... Why should I have to declare any variable most of the time? ... The reason you explicitly declare fields used by a property is that the ... compiler needs to know what the code in the property does. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Properties
    ... There is no preprocessor that converts the second into the first. ... do you think it is better to implicitly declare a field, ... I don't see any reason at all that you can't accomplish what you want to, ... the compiler where and what the field being used in the property definition ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: backup utility for remote hosts
    ... This is the wrong place to declare them. ... smallest applicable scope unless you have a reason not to. ... applies in all programming languages not just Perl). ... > close STDERR; ...
    (comp.lang.perl.misc)