Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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?




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



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
Is filepath valid? Rookie_User Excel Programming 8 March 9th 07 09:04 AM
Is filepath valid? Mike Excel Programming 0 March 8th 07 07:54 PM
Filepath Marie-Jo Excel Discussion (Misc queries) 3 July 5th 05 07:56 PM
Filepath Marie-Jo Excel Discussion (Misc queries) 2 June 30th 05 11:06 PM
get filename and filepath Robert Ehrlich Excel Programming 3 December 21st 03 12:23 PM


All times are GMT +1. The time now is 09:48 PM.

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"