Re: Invalid procedure call or argument - Dir function
- From: Bob O`Bob <filterbob@xxxxxxxxxxxxxxx>
- Date: Wed, 17 Jan 2007 19:35:30 -0800
Karl E. Peterson wrote:
Bob Butler <tiredofit@xxxxxxxxxxx> wrote:"Karl E. Peterson" <karl@xxxxxxxx> wrote in message
news:ODDWOJpOHHA.5104@xxxxxxxxxxxxxxxxxxxx
guy_jara@xxxxxxxxx wrote:I can't duplicate it and I think it's pretty unlikely. The odds are muchTakeaway: It would appear that long periods of time between calls toThat's an incredibly interesting observation! One that could be
the Dir function causes it to loose "reference," if you will, to the
previously initialized search pattern, and moreover, to the function
itself.
tested, empirically, were one wanting to. It infers that VB is
calling FindClose after some set period of elapsed time. Hmmmmm....
better that the code the OP is using calls Dir soemwhere in the file copy
routine to test for a file's existence and the time delay is a red herring.
That does sound like a more probably explanation, yep...
I think so, too.
But it shouldn't be hard to test.
I've just started a demo app that's going to wait longer and longer periods
between calls, starting at five minutes and adding 30 seconds each call.
I've got two instances running, with different start times by >10 minutes,
looking at the same directory, just in case somehow they interact.
I should be able to let them run for hours. We'll see.
By the way, that /is/ the error one gets if one makes another parameterless
call after getting the empty string back. So a minor coding error is yet
another higher probability, IMO.
Bob
--
.
- Follow-Ups:
- Re: Invalid procedure call or argument - Dir function
- From: Bob O`Bob
- Re: Invalid procedure call or argument - Dir function
- References:
- Invalid procedure call or argument - Dir function
- From: guy_jara
- Re: Invalid procedure call or argument - Dir function
- From: Karl E. Peterson
- Re: Invalid procedure call or argument - Dir function
- From: Bob Butler
- Re: Invalid procedure call or argument - Dir function
- From: Karl E. Peterson
- Invalid procedure call or argument - Dir function
- Prev by Date: Re: Invalid procedure call or argument - Dir function
- Next by Date: Re: Older post
- Previous by thread: Re: Invalid procedure call or argument - Dir function
- Next by thread: Re: Invalid procedure call or argument - Dir function
- Index(es):
Loading