+ Reply to Thread
Results 1 to 5 of 5

Go to next if file path doesn't exist

  1. #1
    Registered User
    Join Date
    04-12-2019
    Location
    Dallas
    MS-Off Ver
    2016
    Posts
    64

    Go to next if file path doesn't exist

    I am trying to go through a list of files, but I know some of the files will not have a correct file path. When I run it if it isn't a correct path it brings up a file folder. Is there a way to make it so if it does open a file folder it closes it and goes to next without me having to cancel it? Here is the current code I have now:

    Please Login or Register  to view this content.

  2. #2
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Go to next if file path doesn't exist

    I take it c.Value is the filename?
    When you say path doesn't exist, you mean path AND filename I assume? Because if it the path that is wrong they you may as well cancel it all since none of the files will be found
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  3. #3
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Go to next if file path doesn't exist

    If my understanding is correct:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-12-2019
    Location
    Dallas
    MS-Off Ver
    2016
    Posts
    64

    Re: Go to next if file path doesn't exist

    Yes c.Value is the file name. The path is correct, but the file name is not. Some will be correct and others wont. They're all spread out. I know the file name will be incorrect, I just want it to go to the next file if it is incorrect.

  5. #5
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Go to next if file path doesn't exist

    Have you tried the code I posted?

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] File Copy Failing if Path Doesn't Exist
    By amartin575 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 01-22-2018, 08:41 PM
  2. If file path doesn't exist excel freezes
    By Harribone in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-18-2015, 01:36 PM
  3. [SOLVED] Syntax Compile Error - How to work around this (file path doesn't exist)
    By Harribone in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-18-2015, 08:19 AM
  4. [SOLVED] Look for a File and create one if it doesn't exist
    By Titansmasher in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-08-2012, 07:43 PM
  5. [SOLVED] VBA Loop - Does file exist (Y/N) at the path specified?
    By always_learning in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-12-2012, 07:01 PM
  6. Macro to check dynamic file path and create if does not exist
    By Matso in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-30-2011, 01:56 AM
  7. Shared File doesn't exist
    By rvancura32 in forum Excel General
    Replies: 0
    Last Post: 02-09-2009, 01:19 PM

Tags for this Thread

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