How to get the Original Path to an XLTM

LS2021

New Member
Joined
Feb 17, 2021
Messages
13
Office Version
  1. 2019
Platform
  1. Windows
I'm working on a project that is using VBA code and it is saved as an XLTM So that multiple people can open and use at same time and since this project is going to be used by other divisions and not knowing where they will place this file and the other that are needed to used I need to refer back to the original File folder to open other Files used with in the project
this is what I used and works if i have the XLTM file its self open
Set wbBook1 = ActiveWorkbook
MasterPath = wbBook1.Path
But when i Double click and open the new file is opened with out referring back to the original path its just empty which make sense
so is there a way to either get the original path as the file is opening or some way to get it with out having the person going back and selecting it with the out using File Dialog Folder Picker?
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Forum statistics

Threads
1,215,095
Messages
6,123,072
Members
449,093
Latest member
ripvw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top