get current filepath in excel vba

M

matt

i've got a macro that refernces other files. rather than hard code the
filepath for the folder the excel file is in, is there a way to determine
the current filepath? it's just that i have different users who have
different shortcuts to the folder and don't want to hard code.

cheers in advance
Matthew
 
D

Dave Peterson

The path of an open workbook?

msgbox activeworkbook.path 'the activeworkbook
msgbox thisworkbook.path 'the workbook with the code

msgbox curdir 'the current directory (when you hit File|open)
 
Top