Find folder macro was in

  • Thread starter Thread starter Fred Smith
  • Start date Start date
F

Fred Smith

I have all my macros in one file. I run them from a custom menu item.
However, depending on the computer the macros are run on, the folder the
file is loaded from could be different.

Is it possible to determine the folder the macro file was loaded from?
 
Fred,

If you take up this function in (all versions) of your macrofile, that
function will return the path of the (loaded) version of the file.
(NB Not tested)

Function MacroFilePath()
MacroFilePath = Workbooks("Persnlk.xls").Path
End Function

Ofcourse : Change persnlk.xls with the name of your macro file.

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
Back
Top