ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Path Not Found Error (https://www.excelbanter.com/excel-programming/280879-path-not-found-error.html)

Ric Payne

Path Not Found Error
 
Hello my firends,
I'm trying to do what seems to me to be a verysimple thing. use MkDir
to create a directory.

my code looks like this:

Dim PathName as String

PathName=Sheets("sheet1").range("a1") ' this cell contains
C:\App\data\ as the string

MkDir PathName
....

when i run it i get a Path Not Found error.

but when i run the following it's fine;

MkDir Thisworkbook.Path & "\" & PathName

Thanks in advance.


All times are GMT +1. The time now is 10:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com