Hello everyone,
I am having trouble with the Dir function. This is the first time I have used it, and I don't think I understand where it searches.
When I type:
Dim Path As String
Path = Application.ActiveWorkbook.Path
MsgBox Path
The Messagebox returns a path.
However adding Dir:
Dim Path As String
Dim str As String
Path = Application.ActiveWorkbook.Path
MsgBox Path
str =Dir(Path)
MsgBox str
The second MessageBox is empty.
Why is Dir not able to use the given path?
I am having trouble with the Dir function. This is the first time I have used it, and I don't think I understand where it searches.
When I type:
Dim Path As String
Path = Application.ActiveWorkbook.Path
MsgBox Path
The Messagebox returns a path.
However adding Dir:
Dim Path As String
Dim str As String
Path = Application.ActiveWorkbook.Path
MsgBox Path
str =Dir(Path)
MsgBox str
The second MessageBox is empty.
Why is Dir not able to use the given path?