Hi Gojavid
Application.Wait (Now + TimeValue("0:00:03"))
See also
http://www.cpearson.com/excel/ShellAndWait.htm

Signature
Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm
>I have some code that maps a network drive using a shell and command
> prompt. In the same code it checks if the command was successful or
[quoted text clipped - 13 lines]
>
> Any ideas?
Gojavid,
The problem with a timeout is that you don't know how long to wait, unless you make it long
enough for worst-case situations, and then it takes longer to run than it ought to. Try
this psuedo-code:
Get start time (StartTzime = Now() )
Test for drive (If dir("mapped drive name")<>"")
No,
Been too long? (test current time against StartTime)
Yes, get out, mapping failed
No,
Go back and test again (with one-second wait if desired)
Yes,
done

Signature
Earl Kiosterud
www.smokeylake.com
Note: Some folks prefer bottom-posting.
But if you bottom-post to a reply that's
already top-posted, the thread gets messy.
When in Rome...
-----------------------------------------------------------------------
>I have some code that maps a network drive using a shell and command
> prompt. In the same code it checks if the command was successful or
[quoted text clipped - 13 lines]
>
> Any ideas?
Gojavid - 15 Jun 2007 21:03 GMT
Thank you to both of you!
> Gojavid,
>
[quoted text clipped - 37 lines]
>
> > Any ideas?