+ Reply to Thread
Results 1 to 5 of 5

Testing if a network file exists?

  1. #1
    Registered User
    Join Date
    05-26-2008
    Posts
    3

    Testing if a network file exists?

    I've had a good search on the Net for any help on this question without success. In my Excel (2003) macro, I want to open a text file that is on a different PC. I have a test to see if it exists, but if the network connection to that other PC is down, my test crashes.

    My test at the moment looks like:
    Please Login or Register  to view this content.
    where sFullFileName is a string with the full path which can be something like:
    \\stage2test\C\Data\Sensors\Logs\27272.txt

    The test works when the network connection is there. How can I test the network connection to the other PC?

    Thanks,
    Neil
    Last edited by royUK; 05-26-2008 at 12:21 PM.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    Welcome to the Forum. Please take the time to read the Rules & use Code tags in future. I will add them for you this time.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    This might help

    http://www.tek-tips.com/viewthread.cfm?qid=768126

  4. #4
    Registered User
    Join Date
    05-26-2008
    Posts
    3

    Thumbs up

    Sorry for not posting properly.

    Thanks for the link, that seems to do just what I want.

  5. #5
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    No problem glad that helped.

+ 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