+ Reply to Thread
Results 1 to 4 of 4

Directory not exist

  1. #1
    Forum Contributor
    Join Date
    09-21-2015
    Location
    nederland
    MS-Off Ver
    2021
    Posts
    204

    Directory not exist

    Please help,

    when I change the name of directory on Sheets("Settings").Range("F4")

    I get error directory is not exist, I need to create directory manual, below VBA is working if the directory not change,

    it's possible to add vba if directory not exist wil be create automaticaly.


    Thank you


    Please Login or Register  to view this content.
    Last edited by kirana2014; 10-12-2023 at 12:58 PM.

  2. #2
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Directory not exist


    (removed as I misread)
    Last edited by Marc L; 10-12-2023 at 05:23 AM.

  3. #3
    Valued Forum Contributor rollis13's Avatar
    Join Date
    01-26-2012
    Location
    Cordenons
    MS-Off Ver
    Excel 2016 32bit - Win 11
    Posts
    917

    Re: Directory not exist

    Have a try adding this line of code:
    Please Login or Register  to view this content.
    Ps. Hi to all.
    Difficult is not to know but to share what you know (Han Fei Tzu reworked)

  4. #4
    Forum Expert
    Join Date
    08-17-2007
    Location
    Poland
    Posts
    2,229

    Re: Directory not exist

    Another solution.
    MyMkDirFSO function can create a multiple nested folder structure (e.g. "D:\Test\a\b\c\d"). It can, of course, be used to create just one folder.
    The OpslaanOverzichtalsPDF procedure has been modified to protect against invalid folder names (when using forbidden characters) or lack of permission to edit the folder.
    Please Login or Register  to view this content.
    Artik

+ 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. Check if a file exist in directory with excel
    By biroulcontabil in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-24-2017, 11:49 AM
  2. Search from a list of hyperlink if the file exist then select the path as directory
    By jiaweilee in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-27-2016, 12:03 AM
  3. Check if files (300+) exist in directory
    By uncleslinky in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-01-2011, 12:04 PM
  4. Create new directory if it doesn't exist and save sheet
    By rkjudy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-01-2011, 01:47 PM
  5. Check if Directory Exist
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-02-2008, 03:32 PM
  6. [SOLVED] Save to directory and create if not exist
    By Rob in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-29-2005, 02:06 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