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 *
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top