Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Path names to xla file in formula

I have defined several functions in a xla file. When Excel saves the workbook
the physical path to the xla file is prepended to any references to those
functions in the formulas.

I want to be able to publish the workbook to our Portal, and have everyone
be able to open it without having to update the links if their xla is not
stored in the same path as mine.

How can I get around this? Is there a way to tell Excel not to include the
physical path to the xla file, or to automatically resolve it to the correct
path when opening the workbook?

Carl
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Path names to xla file in formula

Unfortunately, there is no way to do this.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Carl L" wrote in message
...
I have defined several functions in a xla file. When Excel saves
the workbook
the physical path to the xla file is prepended to any
references to those
functions in the formulas.

I want to be able to publish the workbook to our Portal, and
have everyone
be able to open it without having to update the links if their
xla is not
stored in the same path as mine.

How can I get around this? Is there a way to tell Excel not to
include the
physical path to the xla file, or to automatically resolve it
to the correct
path when opening the workbook?

Carl



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Path names to xla file in formula

Thanks. I had pretty much come to that conclusion.

Carl

"Chip Pearson" wrote:

Unfortunately, there is no way to do this.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Carl L" wrote in message
...
I have defined several functions in a xla file. When Excel saves
the workbook
the physical path to the xla file is prepended to any
references to those
functions in the formulas.

I want to be able to publish the workbook to our Portal, and
have everyone
be able to open it without having to update the links if their
xla is not
stored in the same path as mine.

How can I get around this? Is there a way to tell Excel not to
include the
physical path to the xla file, or to automatically resolve it
to the correct
path when opening the workbook?

Carl




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 70
Default Path names to xla file in formula

Grüezi Carl

Carl L schrieb am 04.02.2005

I have defined several functions in a xla file. When Excel saves the workbook
the physical path to the xla file is prepended to any references to those
functions in the formulas.

I want to be able to publish the workbook to our Portal, and have everyone
be able to open it without having to update the links if their xla is not
stored in the same path as mine.

How can I get around this? Is there a way to tell Excel not to include the
physical path to the xla file, or to automatically resolve it to the correct
path when opening the workbook?


Maybe the following code in Workbook_Open() could help:

xla = "Your_AddIn.xla" 'Filename of your AddIn
aLinks = Me.LinkSources(xlExcelLinks)

If Not IsEmpty(aLinks) Then
For i = 1 To UBound(aLinks)
res = Right(aLinks(i), Len(aLinks(i)) - InStrRev(aLinks(i), "\"))
If res = xla Then
Me.ChangeLink aLinks(i), xla, xlExcelLinks
Exit For
End If
Next i
End If




Regards
Thomas Ramel

--
- MVP for Microsoft-Excel -
[Win XP Pro SP-2 / xl2000 SP-3]
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Path names to xla file in formula

Chip,

I once wrote an addin that did it, cant find the code though..

Its principle:

an application event handler monitoring opening of workbooks.
for opened workbooks, check filelinks.
if filelinks include refs to myAddin.xla but with different path,
then change refs.



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Chip Pearson wrote :

Unfortunately, there is no way to do this.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Path names to xla file in formula

Sure, I could fix it by writing code. I was hoping that Excel had an option
which would cause it to only store the name of the XLA file without the path.
Then when the workbook was opened it would find a match in the registered
add-ins and resolve the path from that...

Thanks for the suggestions.

Carl

"Thomas Ramel" wrote:

Grüezi Carl

Carl L schrieb am 04.02.2005

I have defined several functions in a xla file. When Excel saves the workbook
the physical path to the xla file is prepended to any references to those
functions in the formulas.

I want to be able to publish the workbook to our Portal, and have everyone
be able to open it without having to update the links if their xla is not
stored in the same path as mine.

How can I get around this? Is there a way to tell Excel not to include the
physical path to the xla file, or to automatically resolve it to the correct
path when opening the workbook?


Maybe the following code in Workbook_Open() could help:

xla = "Your_AddIn.xla" 'Filename of your AddIn
aLinks = Me.LinkSources(xlExcelLinks)

If Not IsEmpty(aLinks) Then
For i = 1 To UBound(aLinks)
res = Right(aLinks(i), Len(aLinks(i)) - InStrRev(aLinks(i), "\"))
If res = xla Then
Me.ChangeLink aLinks(i), xla, xlExcelLinks
Exit For
End If
Next i
End If




Regards
Thomas Ramel

--
- MVP for Microsoft-Excel -
[Win XP Pro SP-2 / xl2000 SP-3]

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
Formula Bar show the location path file plus the formula Manos Excel Discussion (Misc queries) 1 June 25th 09 08:10 PM
File name and path formula in Excel 2003 Graeme Excel Discussion (Misc queries) 2 February 8th 08 11:28 AM
Formula too long - new file path is shorter than old file path - Excel 2003 Greg J Excel Worksheet Functions 1 November 22nd 06 05:16 PM
Create formula to grab file path Sonnie Excel Discussion (Misc queries) 0 August 16th 06 06:48 PM
Indirect and Path & File Names Anthony Slater Excel Discussion (Misc queries) 3 April 29th 05 03:38 PM


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

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

About Us

"It's about Microsoft Excel"