View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default using dir to get folder names

MyPath = "c:\"
MyName = Dir(MyPath, vbDirectory)
Do While MyName < ""
If (GetAttr(MyPath & MyName) And vbDirectory) = vbDirectory Then
MsgBox(MyName)
End If
MyName = Dir()
Loop

If this post helps click Yes
---------------
Jacob Skaria


"pjryan" wrote:

I am using dir(path, vbdirectory) to return the names of folders and files,
but instead of getting the folder name, I am getting "." How can I remedy
this.

Thanks