+ Reply to Thread
Results 1 to 5 of 5

File does not exist - error handler

  1. #1
    Registered User
    Join Date
    08-18-2005
    Posts
    12

    File does not exist - error handler

    Hi

    I got a problem and somehow I am not able to solve it. The purpose of the code is to update all files listed on the coverage.xls file (e.g. R:\APS\AMR\REBR\SwissCompanies\SIG\SIG.xls. Sometimes it happens that a company on the coverage.xls file does not any longer exist, so it need get the next company (i+1). To handle that in a proper way I need to have an error handler. But I don’t know how. Could anybody help me?

    Thanks.
    Michael


    Please Login or Register  to view this content.
    Last edited by VBA Noob; 09-20-2007 at 03:15 AM.

  2. #2
    Forum Contributor stevebriz's Avatar
    Join Date
    09-07-2006
    Location
    Santiago Chile
    Posts
    389
    You can check to see if a file exists using the function below :
    This is on the msdn website.
    http://msdn.microsoft.com/library/de...ce09072000.asp


    Please Login or Register  to view this content.
    VBA - The Power Behind the Grid

    Posting a sample of your workbook makes it easier to look at the Issue.

  3. #3
    Registered User
    Join Date
    08-18-2005
    Posts
    12

    How to implement

    Thank you for the function DoesFileExist. Now I got the function, but how can I implement the function in my module?

    Thanks
    Michael

  4. #4
    Registered User
    Join Date
    08-18-2005
    Posts
    12

    Help please

    I would very much appreciate if anybody could help me.

    Thanks a lot.
    Michael

  5. #5
    Registered User
    Join Date
    03-17-2005
    Posts
    18
    Hi Michael,

    If you add the code above to your module, then call it like so:

    'your code

    DoesFileExist(<enter your file in here>)

    'more of your code

+ 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