Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Code for Correct location of Add-ins for all versions of Excel

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Code for Correct location of Add-ins for all versions of Excel

Just for information, not available in Excel 97. Must have been introduced
in xl2000

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
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





  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Code for Correct location of Add-ins for all versions of Excel

Thanks, that makes sense as it was then (?) that the user profile area
started to be used rather than the Office Excel area. Do we know the 97
path?


Bob


"Tom Ogilvy" wrote in message
...
Just for information, not available in Excel 97. Must have been

introduced
in xl2000

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
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







  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Code for Correct location of Add-ins for all versions of Excel

I suspect it is what he has:

? Application.LibraryPath
C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\LIBRARY


--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
Thanks, that makes sense as it was then (?) that the user profile area
started to be used rather than the Office Excel area. Do we know the 97
path?


Bob


"Tom Ogilvy" wrote in message
...
Just for information, not available in Excel 97. Must have been

introduced
in xl2000

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
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










  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Code for Correct location of Add-ins for all versions of Excel

To the OP,

This all means that you need to test the version and use a different path.
It can be done with conditional compilation like so

#If VBA6 Then
myPath = Application.UserLibraryPath
#Else
myPath = Application.LibraryPath
#End If


--

HTH

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


"Tom Ogilvy" wrote in message
...
I suspect it is what he has:

? Application.LibraryPath
C:\PROGRAM FILES\MICROSOFT OFFICE\OFFICE\LIBRARY


--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
Thanks, that makes sense as it was then (?) that the user profile area
started to be used rather than the Office Excel area. Do we know the 97
path?


Bob


"Tom Ogilvy" wrote in message
...
Just for information, not available in Excel 97. Must have been

introduced
in xl2000

--
Regards,
Tom Ogilvy

"Bob Phillips" wrote in message
...
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










  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default Code for Correct location of Add-ins for all versions of Excel

Bob and Tom . Pretty good service for a Sunday afternoon! I am most
grateful. Looks like we had it right first time.
Tom, I am under the impression you are in the US - but are you actually
in Britain ? We are in Scotland...
Best regards - Charles



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
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
Loosing correct hyperlnk location after sorting spreadsheet data LostnSpace Excel Discussion (Misc queries) 2 February 2nd 06 10:15 PM
Help to correct code Pat Excel Programming 6 December 29th 04 05:02 PM
Reproducable Hard Crash in Excel 2003 (and earlier versions) with the following VBA code. David Battams Excel Programming 10 June 26th 04 01:50 AM
VB code needed for running newer excel version macros in older excel versions Tom Excel Programming 6 October 16th 03 03:11 AM
Code for runnning macros created in XP in older excel versions Tom Excel Programming 1 October 15th 03 02:41 PM


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

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"