When I call the function Dir(quot;Q:\quot;) and Q:\ is a network mapped drive does
it fail (return quot;quot;) if it does not receive a reply within a certain
time-limit? The reason why I ask is because the update response from a
network mapped drive is very slow here. If the slow response causes
Dir(quot;Q:\quot;) function to return quot;quot; then how can I make it longer time-out?
What is the best way to test whether a drive exists? Sometimes the Dir(quot;C:quot;)
returns quot;quot; even when the drive is completely valid.
Maybe I should do ChDrive then test Err.Number. Then ChDir then test
Err.Number???quot;KevinGPOquot; gt; wrote in message
...
gt; When I call the function Dir(quot;Q:\quot;) and Q:\ is a network mapped drive does
gt; it fail (return quot;quot;) if it does not receive a reply within a certain
gt; time-limit? The reason why I ask is because the update response from a
gt; network mapped drive is very slow here. If the slow response causes
gt; Dir(quot;Q:\quot;) function to return quot;quot; then how can I make it longer time-out?
gt;
The first article is for visual basic (the language), but is easily
adaptable to VBA.
support.microsoft.com/kb/291573/en-us
How To Use Visual Basic to List Active Logical DrivesThis is a general sample file for the Filesystem object found in the
Scripting runtime and available for your use by creating a reference to it
in the VBA in tools=gt;references or by using late binding:
support.microsoft.com/kb/190882/en-us
SAMPLE: FSOSAMP.EXE Application Uses the FileSystem Object
--
Regards,
Tom Ogilvy
quot;KevinGPOquot; gt; wrote in message
...
gt; What is the best way to test whether a drive exists? Sometimes the
Dir(quot;C:quot;)
gt; returns quot;quot; even when the drive is completely valid.
gt;
gt; Maybe I should do ChDrive then test Err.Number. Then ChDir then test
gt; Err.Number???
gt;
gt;
gt; quot;KevinGPOquot; gt; wrote in message
gt; ...
gt; gt; When I call the function Dir(quot;Q:\quot;) and Q:\ is a network mapped drive
does
gt; gt; it fail (return quot;quot;) if it does not receive a reply within a certain
gt; gt; time-limit? The reason why I ask is because the update response from a
gt; gt; network mapped drive is very slow here. If the slow response causes
gt; gt; Dir(quot;Q:\quot;) function to return quot;quot; then how can I make it longer time-out?
gt; gt;
gt;
gt;
- Oct 22 Sun 2006 20:10
HELP: Dir() time-out woes :( .....
close
全站熱搜
留言列表
發表留言