You don't think doing a file io to get the filename is a bit slow?
Don't get me wrong, I have used Dir myself when I am lazy, but . . .
--
Regards,
Tom Ogilvy
"Tushar Mehta" wrote in message
news:MPG.1a9aaa7e4547571d9896ed@news-server...
Nice!
--
Regards,
Tushar Mehta, MS MVP -- Excel
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
In article ,
says...
Another way ..
Sub TesterII()
Dim str As String
Dim xfile As String
Dim xpath As String
str = "D:\Development Path\Main Files\Test Procedures\Sample Data.mdb"
xfile = Dir(str)
xpath = Left(str, Len(str) - Len(xfile))
MsgBox xfile
MsgBox xpath
End Sub