Forum Discussion

vthomeschoolmom's avatar
vthomeschoolmom
Super Contributor
15 years ago

skipping line of script

This is weird. There is a line in my script that is just being SKIPPED except when run in debug mode.  It is a call to a sub that I reuse all over the place. In this one script, it just isn't getting run. If I put a breakpoint on it, it runs.



Help!



S

3 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor
    Could you post the script that you're having problems with, marking the line that's getting skipped?  It would be helpful to see the specifics to know best how to answer.
  • Hi,



    Also, how do you run your test? What happens if you run just the routine which contains the problematic line?
  • I was mistaken about which line was being skipped. I thought it was the entire procedure call. But by adding Log.Message notes into the log file I was able to see that the line is



    grdMyGrid.MoveLast



    which goes before a loop

    Do While Not grdMyGrid.BOF

    ...



    Since the movelast was not executed, I BOF was true and my test was unhappy.



    When I tested for grid existence, it did exist.But I could see that the test was running really fast. By throwing a short delay before the MoveLast, I was able to solve the problem.





    Not a HUGE fan of delays. But in this case, I can see how it is necessary in some weird way.



    Thanks.



    S