ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Getting the filepath of a template (https://www.excelbanter.com/excel-programming/407870-getting-filepath-template.html)

Boing Boing Dave

Getting the filepath of a template
 
I have a template which is to be distributed across various networks. When
the template is launched I need to be able to get the filepath of the
original template to subsequently read an ini file.
In Word this is 'ActiveDocument.AttachedTemplate' but can anyone tell me how
to do this in Excel please?

Bob Phillips

Getting the filepath of a template
 
ActiveWorkbook.Path

assuming the template is the active workbook

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Boing Boing Dave" <Boing Boing wrote in
message ...
I have a template which is to be distributed across various networks. When
the template is launched I need to be able to get the filepath of the
original template to subsequently read an ini file.
In Word this is 'ActiveDocument.AttachedTemplate' but can anyone tell me
how
to do this in Excel please?




Boing Boing Dave[_2_]

Getting the filepath of a template
 
Thanks Bob, but that only works if the workbook has been saved. I need to do
some calculations based on data in the ini file which will be in the same
folder as the template.

"Bob Phillips" wrote:

ActiveWorkbook.Path

assuming the template is the active workbook

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Boing Boing Dave" <Boing Boing wrote in
message ...
I have a template which is to be distributed across various networks. When
the template is launched I need to be able to get the filepath of the
original template to subsequently read an ini file.
In Word this is 'ActiveDocument.AttachedTemplate' but can anyone tell me
how
to do this in Excel please?





Dave Peterson

Getting the filepath of a template
 
Excel doesn't keep track of the template location like MSWord does.

Maybe you can just ask the user the location?

Boing Boing Dave wrote:

Thanks Bob, but that only works if the workbook has been saved. I need to do
some calculations based on data in the ini file which will be in the same
folder as the template.

"Bob Phillips" wrote:

ActiveWorkbook.Path

assuming the template is the active workbook

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Boing Boing Dave" <Boing Boing wrote in
message ...
I have a template which is to be distributed across various networks. When
the template is launched I need to be able to get the filepath of the
original template to subsequently read an ini file.
In Word this is 'ActiveDocument.AttachedTemplate' but can anyone tell me
how
to do this in Excel please?





--

Dave Peterson

Bob Phillips

Getting the filepath of a template
 
or save the filepath of the template in an Excel name and query that?

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



"Dave Peterson" wrote in message
...
Excel doesn't keep track of the template location like MSWord does.

Maybe you can just ask the user the location?

Boing Boing Dave wrote:

Thanks Bob, but that only works if the workbook has been saved. I need
to do
some calculations based on data in the ini file which will be in the same
folder as the template.

"Bob Phillips" wrote:

ActiveWorkbook.Path

assuming the template is the active workbook

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my
addy)



"Boing Boing Dave" <Boing Boing wrote
in
message ...
I have a template which is to be distributed across various networks.
When
the template is launched I need to be able to get the filepath of the
original template to subsequently read an ini file.
In Word this is 'ActiveDocument.AttachedTemplate' but can anyone tell
me
how
to do this in Excel please?




--

Dave Peterson





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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com