View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Code for Correct location of Add-ins for all versions of Excel

Charles,

I have to ask why not just save the file back to where it came from, but if
you continue this approach, look at

Application.UserLibraryPath

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Charles Jordan" wrote in message
om...
Hi - we are writing an application for users who may have any version
of Excel : 97,2000,2002, 2003 etc, and we are developing on several
machines, all running XP, but with XL 2002 on one machine, Xl2003 on
another.

Our install programme has the following code:
DestPname$ = Application.LibraryPath & "\" etc etc

and the result is to install the .xla file as follows:-

In Excel 2000: C:\Program Files\Microsoft Office\Office\Library
In Excel 2003: C:\Program Files\Microsoft Office\Office11\Library

But when developing the .xls/xla further on one of these machines and
saving it directly, as opposed to using the above Install routine,
the .xla then comes to rest in:

C:\Documents and Settings\Administrator\Application
Data\Microsoft\Addins

Please what is the correct code, if possible for all versions of
Excel, and the correct location ie final destination of the .xla ,
please

TIA

Charles