K
Kim J.
Is there a way to extract the full file path into a
message box given just the file name? For example, if I
entered "Testfile.xls" into an input box, I would like
Excel to go out and find the path. It would then return a
message box that says something like:
"c:\programs\excel\myfiles\friday\Testfile.xls"
I've tried . . .
Sub FindPath()
Dim MyFile As String
MyFile = ActiveWorkbook.FullName
MsgBox MyFile
End Sub
but it only works for the active workbook. I would like
to enter any file name and have it return the correct path.
message box given just the file name? For example, if I
entered "Testfile.xls" into an input box, I would like
Excel to go out and find the path. It would then return a
message box that says something like:
"c:\programs\excel\myfiles\friday\Testfile.xls"
I've tried . . .
Sub FindPath()
Dim MyFile As String
MyFile = ActiveWorkbook.FullName
MsgBox MyFile
End Sub
but it only works for the active workbook. I would like
to enter any file name and have it return the correct path.