+ Reply to Thread
Results 1 to 2 of 2

If file path doesn't exist excel freezes

  1. #1
    Valued Forum Contributor Harribone's Avatar
    Join Date
    02-24-2013
    Location
    Midlands, UK
    MS-Off Ver
    Excel 2019/365
    Posts
    570

    If file path doesn't exist excel freezes

    Hi,

    I've only recently entered into the world of VBA and have met with another issue that is beyond my knowledge at the moment.

    Basically I have the below code which opens a file:

    Please Login or Register  to view this content.
    This works fine after TMS kindly pointed out my basic syntax mistake here. As this is designed to work on a network for the company I work at the path is set up for the file on there. At home this location doesn't exist and as a result Excel freezes on me.

    Is there a work around to stop this happening or is my laptop just rubbish?

    Thanks in advance

    Harribone
    Say thanks, click *

  2. #2
    Registered User
    Join Date
    09-01-2011
    Location
    georgia
    MS-Off Ver
    Excel 2010
    Posts
    47

    Re: If file path doesn't exist excel freezes

    I have used something similar to the code block below to check for my file to make sure it exists first. If it does not, I call the End command to terminate the macro.

    Please Login or Register  to view this content.
    <----Don't forget to add reputation if I helped

+ 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] 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
  2. [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
  3. [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
  4. Excel links to file that doesn't exist
    By Chezterfield in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-08-2011, 07:08 AM
  5. Shared File doesn't exist
    By rvancura32 in forum Excel General
    Replies: 0
    Last Post: 02-09-2009, 01:19 PM

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