Use Dir function to get the file directory : Dir « Forms « VBA / Excel / Access / Word






Use Dir function to get the file directory

 
Sub DirDemo()
  Dim FType As String
  FType = "*.xls"
  MsgBox Dir(FType)
  
End Sub

 








Related examples in the same category

1.Dir() Returns a string representing the name of a file or directory with specified pattern.
2.Get Directory by using the Dir function
3.Get the file names
4.Validate the file path