Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 623
Default Find folder macro was in

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?

--
Regards,
Fred
Please reply to newsgroup, not e-mail



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Find folder macro was in

fPath = ThisWorkbook.Pat

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 63
Default Find folder macro was in

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 *

"Fred Smith" wrote in message
...
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?

--
Regards,
Fred
Please reply to newsgroup, not e-mail





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 575
Default Find folder macro was in

Fred,

If you mean, can the macro determine it's own location, yes. Use
thisworkbook.path.

If you mean something else, you'll need to explain...

HTH,

Robin Hammond
www.enhanceddatasystems.com

"Fred Smith" wrote in message
...
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?

--
Regards,
Fred
Please reply to newsgroup, not e-mail





  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 623
Default Find folder macro was in

That's exactly it. Thanks for your help.

--
Regards,
Fred
Please reply to newsgroup, not e-mail


"Robin Hammond" wrote in message
...
Fred,

If you mean, can the macro determine it's own location, yes. Use
thisworkbook.path.

If you mean something else, you'll need to explain...

HTH,

Robin Hammond
www.enhanceddatasystems.com

"Fred Smith" wrote in message
...
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?

--
Regards,
Fred
Please reply to newsgroup, not e-mail







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculations did not find required folder KCK Excel Discussion (Misc queries) 1 April 17th 09 07:07 PM
How to find all folder and/or files in a specific location Mr. GetRight Excel Discussion (Misc queries) 0 July 2nd 08 06:51 PM
What is folder OLK7 and where can I find it? HELP! Excel Discussion (Misc queries) 1 April 1st 05 05:35 AM
how to step thru only one subfolder of a folder to find like files foamfollower Excel Programming 1 November 11th 03 08:40 PM
find if there is a particular folder in a path nikolaosk[_11_] Excel Programming 2 October 20th 03 08:22 AM


All times are GMT +1. The time now is 05:27 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"