Try something like
Dim dteEndTime As Date
dteEndTime = DateAdd("s", 15, Now())
Do While lngPrgId = 0 And dteEndTime > Now()
DoEvents
lngPrgID = Shell(strCommand,vbNormalFocus
Loop
> Hi,
>
[quoted text clipped - 10 lines]
>
> Javier
BeWyched - 20 Dec 2006 13:14 GMT
Try:
StartTime = Now
> > Do While lngprgID = 0
> > ' Quit after 15 seconds if No success
> > DoEvents
> > lngprgID = Shell(strCommand, vbNormalFocus)
If (Now - StartTime) * 24 * 3600 > 15 then Exit Sub
> > Loop
BW
> > Hi,
> >
[quoted text clipped - 10 lines]
> >
> > Javier
javiernews - 20 Dec 2006 17:09 GMT
BW and John !
Thank you !!
Both ways are working good.
Bye