Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default location for XLA's that I can easily get to

I have two small XLA's that I would like to load whenever a user opens
Excel. These are periodically updated, and will have to be copied down
every so often. To ease this task, and initial setup, I want to have
an application that will copy these off a network drive onto the local
machine. I have already made something similar to update an Access
app.

The only thing that's stumping me is where to put these. I think I
want to put them in the XLSTART folder - right? Will XLA's in the
XLSTART automatically load when Excel is opened?

If this is the right place, how do I find _this users_ XLSTART? I used
this for the Access app:

pth = Nz(Environ("USERPROFILE"), "C:\Documents and Settings\All
Users")
desktopPath = pth & "\Desktop\"

But that's because we wanted it on everyone's desktop. What's the
corresponding entry for "this users XLSTART"?

Thanks!

Maury
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default location for XLA's that I can easily get to

Actually, thinking about it now it seems that if I could put this into
All Users it would be even better. But when I looked inside:

C:\Documents and Settings\All Users\Application Data\Microsoft\OFFICE

I did not see an EXCEL folder. If I make a

C:\Documents and Settings\ All Users\Application Data\Microsoft\Excel
\XLSTART

will Excel look there?

Maury
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default location for XLA's that I can easily get to

You can actually put an add in in any folder desired as long as excel knows
where it is. Have you noticed the browse option?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Maury Markowitz" wrote in message
...
Actually, thinking about it now it seems that if I could put this into
All Users it would be even better. But when I looked inside:

C:\Documents and Settings\All Users\Application Data\Microsoft\OFFICE

I did not see an EXCEL folder. If I make a

C:\Documents and Settings\ All Users\Application Data\Microsoft\Excel
\XLSTART

will Excel look there?

Maury


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default location for XLA's that I can easily get to

Not XLSTART. Everything in XLSTART is opened, and the user might not like
that. The default directory for Excel add-ins is

C:\Documents and Settings\[username]\Application Data\Microsoft\Add-Ins

or

C:\Program Files\Microsoft Office\OFFICE11\Library

But Excel doesn't care where an add-in is installed from, so you could
create a directory within

C:\Documents and Settings\All Users\Application Data\

for your add-ins.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"Maury Markowitz" wrote in message
...
Actually, thinking about it now it seems that if I could put this into
All Users it would be even better. But when I looked inside:

C:\Documents and Settings\All Users\Application Data\Microsoft\OFFICE

I did not see an EXCEL folder. If I make a

C:\Documents and Settings\ All Users\Application Data\Microsoft\Excel
\XLSTART

will Excel look there?

Maury



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default location for XLA's that I can easily get to

On Jan 13, 11:04*am, "Jon Peltier"
wrote:
Not XLSTART. Everything in XLSTART is opened, and the user might not like
that. The default directory for Excel add-ins is


The goal is absolutely to open these files, every time. They contain
code that is needed for everything we do.

I was able to write a little code to move these over using FileCopy.
Unfortunately, FileCopy won't copy the file if the _source_ is busy -
which it always is. Is there an analog to FileCopy that doesn't care
about the status of the source?

Maury


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default location for XLA's that I can easily get to

On Jan 13, 11:04*am, "Don Guillett" wrote:
You can actually put an add in in any folder desired as long as excel knows
where it is. Have you noticed the browse option?


Which would be great, except my 15+ users would have to know how to
use this. They don't.

Maury
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default location for XLA's that I can easily get to

The source is busy because you're copying the copy that's open in Excel.
Have your code to a SaveCopyAs to save the workbook/add-in to another
folder.

FileCopy will also choke if the user has open the file it is trying to
replace.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services, Inc.
http://PeltierTech.com/WordPress/
_______


"Maury Markowitz" wrote in message
...
On Jan 13, 11:04 am, "Jon Peltier"
wrote:
Not XLSTART. Everything in XLSTART is opened, and the user might not like
that. The default directory for Excel add-ins is


The goal is absolutely to open these files, every time. They contain
code that is needed for everything we do.

I was able to write a little code to move these over using FileCopy.
Unfortunately, FileCopy won't copy the file if the _source_ is busy -
which it always is. Is there an analog to FileCopy that doesn't care
about the status of the source?

Maury


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 119
Default location for XLA's that I can easily get to

Ok, I have this working, to some useful degree anyway.

Indeed, XLA's placed in the user's XLSTART work exactly as you would
want them too.

The trick to moving them there is to ignore the FileCopy command and
use FileSystem.CopyFile, which doesn't care if the source is busy.

The only remaining problem is that if any copy of excel is open, the
destination is busy and the copy will fail. That's OK, I wrote the
updater code in Access to avoid this.

I'll happily provide the code if anyone is interested.

Maury
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
Macro - save to current location vs excel default location leezard Excel Discussion (Misc queries) 0 October 28th 08 03:04 PM
.XLA's Code Not Available? PeteCresswell[_2_] Excel Programming 2 May 30th 08 03:22 PM
I want to cylce through all the open .xla's as well as the .xls' pinkfloydfan Excel Programming 8 April 2nd 07 11:41 AM
Mouse Location, Movement and Spreadsheet Location TCook Excel Programming 3 October 3rd 05 10:23 PM
Saving variables in XLA's Paul Excel Programming 2 July 9th 04 07:25 PM


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