View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ric Payne Ric Payne is offline
external usenet poster
 
Posts: 7
Default 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.