none
VBA to check if directory exists RRS feed

  • Question

  • how do I use vba to see if:

    "c:\users\user\myfiles\"

    exists

    thanks

    Doug


    • Edited by 6da4 Friday, February 3, 2017 6:25 PM
    Friday, February 3, 2017 6:24 PM

Answers

  •     Dim blnExists As Boolean
        blnExists = (Dir("c:\users\user\myfiles\", vbDirectory) <> "")

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by 6da4 Friday, February 3, 2017 7:48 PM
    Friday, February 3, 2017 7:26 PM

All replies

  •     Dim blnExists As Boolean
        blnExists = (Dir("c:\users\user\myfiles\", vbDirectory) <> "")

    Regards, Hans Vogelaar (http://www.eileenslounge.com)

    • Marked as answer by 6da4 Friday, February 3, 2017 7:48 PM
    Friday, February 3, 2017 7:26 PM
  • Thanks Hans...perfect!!
    Friday, February 3, 2017 7:49 PM