Originally Posted by
Tom Ogilvy
Well, you could perhaps try to discover what it is:
s = "H:\" & ProjectYear & "\"
MyPath = s & ProjectYear & "*" ' Set the path.
MyName = Dir(MyPath, vbDirectory) ' Retrieve the first entry.
Do While MyName <> "" ' Start the loop.
' Ignore the current directory and the encompassing directory.
If MyName <> "." And MyName <> ".." Then
' Use bitwise comparison to make sure MyName is a directory.
If (GetAttr(MyPath & MyName) And vbDirectory) = vbDirectory Then
Msgbox s & MyName ' Display entry only if it
End If ' it represents a directory.
End If
MyName = Dir ' Get next entry.
Loop
But to actually save, you would need the actual path which you should be
able to get from the above code.
--
Regards,
Tom Ogilvy
Bookmarks