+ Reply to Thread
Results 1 to 3 of 3

HELP: Dir() time-out woes :( .....

  1. #1
    KevinGPO
    Guest

    HELP: Dir() time-out woes :( .....

    When I call the function Dir("Q:\") and Q:\ is a network mapped drive does
    it fail (return "") 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("Q:\") function to return "" then how can I make it longer time-out?



  2. #2
    KevinGPO
    Guest

    Re: Dir() time-out woes :( .....

    What is the best way to test whether a drive exists? Sometimes the Dir("C:")
    returns "" even when the drive is completely valid.

    Maybe I should do ChDrive then test Err.Number. Then ChDir then test
    Err.Number???


    "KevinGPO" <[email protected]> wrote in message
    news:[email protected]...
    > When I call the function Dir("Q:\") and Q:\ is a network mapped drive does
    > it fail (return "") 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("Q:\") function to return "" then how can I make it longer time-out?
    >




  3. #3
    Tom Ogilvy
    Guest

    Re: Dir() time-out woes :( .....

    The first article is for visual basic (the language), but is easily
    adaptable to VBA.
    http://support.microsoft.com/kb/291573/en-us
    How To Use Visual Basic to List Active Logical Drives


    This 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=>references or by using late binding:
    http://support.microsoft.com/kb/190882/en-us
    SAMPLE: FSOSAMP.EXE Application Uses the FileSystem Object

    --
    Regards,
    Tom Ogilvy
    "KevinGPO" <[email protected]> wrote in message
    news:[email protected]...
    > What is the best way to test whether a drive exists? Sometimes the

    Dir("C:")
    > returns "" even when the drive is completely valid.
    >
    > Maybe I should do ChDrive then test Err.Number. Then ChDir then test
    > Err.Number???
    >
    >
    > "KevinGPO" <[email protected]> wrote in message
    > news:[email protected]...
    > > When I call the function Dir("Q:\") and Q:\ is a network mapped drive

    does
    > > it fail (return "") 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("Q:\") function to return "" then how can I make it longer time-out?
    > >

    >
    >




+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1