Will this do?
Sub whatpath()
MsgBox ActiveWorkbook.Path
End Sub
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
(E-Mail Removed)
"Ted M H" <(E-Mail Removed)> wrote in message
news:7F2BF7BB-B420-48C1-B8E9-(E-Mail Removed)...
> I'm trying to find the property that returns the current / active file
> path
> in Excel. This is not the Application DefualtFilePath property and it's
> not
> the fullname property of any one workbook.
> It's the file path that is set temporarily if you open or save as a
> workbook
> in a folder other than the application default file path. After you open
> a
> file in such a folder, it becomes the new current / active path when you
> do
> another file Open or save as command. I thought at first that the
> Application.DefaultFilePath would change in this situation, but it does
> not.
> I can't find anything called the current or active file path in the Object
> model refernece, but that property has to stored somewhere.
> What I'm trying to do is to store this property in a string variable, then
> change the directory a few times and then use the string variable to reset
> the file path to its value before the macro ran.
>
> Any ideas?