Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Aboslute path to reference macro

Hi,

I have an 'xla' file containing all my macros, when I open this file using
Excel, I can insert a formula using a sub in my xla file (let's say =F(1)).
It's working fine.
I save this workbook and pass it to a colleague who copy it into a directory
where he has also my 'xla' file.

1 - if the directory containing the 'xla' file is not exactly the same on my
colleague's computer, opening the workbook will fail because Excel is not
able to find the 'xla' containing the sub '=F(...)', even if this macro file
is in the same directory than the workbook and Excel has been launched by
double clicking of the macro file. Excel is using an absolute path to
reference the call to xla file and it prevent me from using it that way, if
it were using a relative path it would be ok. Do you know a workaround for
that ? A way to make it store a relative path ?

2 - so, as a workaround I told every one to use the same path I was using,
let's say 'c:\program files\MyAddin\MyMacros.xla' so that everyone can create
and exchange workbook using the macro in the exact same directory. But a
another issue appeared: some computers store the path in DOS format
('c:\progra~1\MyAddin\MyMacros.xla') and other store the full path
('c:\program files\MyAddin\MyMacros.xla') but these two kind of files are not
compatible! It a little bit complicated because some users are connected
through Terminal Server, others are working on WorkStation ...

I'm stuck so if anyone has an ideas, it would be greatly appreciated.

David.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Aboslute path to reference macro

Hi,
thanks for your suggestion but I've done that and it not good enough because
of what I've explained in the second part: a workbook built using the sub in
the xla won't be compatible from a workstation to an another (the stored path
is a strange DOS path on some of the computers, and a full path on the
others).

Thanks,
David.

"Chip Pearson" wrote:

The simplest solution would be to put the XLA in the XLStart folder on each
machine. This folder is typically

C:\Program Files\Microsoft Office\Office11\XLStart

At startup, Excel opens all files in that folder.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



"daboul" wrote in message
...
Hi,

I have an 'xla' file containing all my macros, when I open this file using
Excel, I can insert a formula using a sub in my xla file (let's say
=F(1)).
It's working fine.
I save this workbook and pass it to a colleague who copy it into a
directory
where he has also my 'xla' file.

1 - if the directory containing the 'xla' file is not exactly the same on
my
colleague's computer, opening the workbook will fail because Excel is not
able to find the 'xla' containing the sub '=F(...)', even if this macro
file
is in the same directory than the workbook and Excel has been launched by
double clicking of the macro file. Excel is using an absolute path to
reference the call to xla file and it prevent me from using it that way,
if
it were using a relative path it would be ok. Do you know a workaround for
that ? A way to make it store a relative path ?

2 - so, as a workaround I told every one to use the same path I was using,
let's say 'c:\program files\MyAddin\MyMacros.xla' so that everyone can
create
and exchange workbook using the macro in the exact same directory. But a
another issue appeared: some computers store the path in DOS format
('c:\progra~1\MyAddin\MyMacros.xla') and other store the full path
('c:\program files\MyAddin\MyMacros.xla') but these two kind of files are
not
compatible! It a little bit complicated because some users are connected
through Terminal Server, others are working on WorkStation ...

I'm stuck so if anyone has an ideas, it would be greatly appreciated.

David.


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
VBA reference path goes to lower case Stoney Excel Programming 3 August 9th 06 01:02 PM
file path: reference to other workbooks muster Excel Worksheet Functions 8 July 28th 06 09:46 PM
Why do add-ins reference specific path [email protected] Excel Programming 0 June 13th 06 03:35 PM
How to remove path from macro reference seppo Excel Discussion (Misc queries) 2 February 22nd 06 07:08 AM
Path Reference in cells Jeff Coleman Excel Programming 1 July 30th 03 05:22 PM


All times are GMT +1. The time now is 04:09 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"