Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
Find folder macro was in
|
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Calculations did not find required folder | Excel Discussion (Misc queries) | |||
How to find all folder and/or files in a specific location | Excel Discussion (Misc queries) | |||
What is folder OLK7 and where can I find it? | Excel Discussion (Misc queries) | |||
how to step thru only one subfolder of a folder to find like files | Excel Programming | |||
find if there is a particular folder in a path | Excel Programming |