ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   XLStart question (https://www.excelbanter.com/excel-discussion-misc-queries/133735-xlstart-question.html)

[email protected]

XLStart question
 
Hi,

Our company just upgraded from Office 97 to Office 2003. We have a VB
application that sometimes needs to launch Excel and run some macros.
When it needs to do this it copies the .xls file containing the macros
to
...\program files\office11\xlstart and then launches Excel. When the
app is done running, it removes this file from XLStart. So far we
have upgrades about 600 people and this approach seems to be working
for almost everyone. However we have had 3 cases where the file gets
copied to the XLStart folder and Excel gets started, but the file in
XLStart doesn't open.

It sounds like by default, Office 2003 wants to look in ...\documents
and settings\current user\..... for the xlstart folder. When we try
physically copying the file to this location on the computers that
aren't working, it works fine. My question is, why does Excel know to
look in program files\office11\xlstart in most cases, but doesn't know
to look there for these 3 cases?

Because each user is going to have a different value for the current
user part of the path in documents and settings, we don't know how to
get our VB code to copy the file over to the XLStart in that location
so we would like to figure out how to fix things in cases where it
doesn't know to look in the Office11 folder.

I hope I explained myself clearly here. If you have any ideas, I
would sure appreciate hearing from you.

Thanks


Dave Peterson

XLStart question
 
I'd go to those three people's pc and find out if their XLStart paths are
different.

Open excel on those pc (logged on as the problem user <bg)
hit alt-f11 to get to the vbe
hit ctrl-g to see the immediate window
type this and hit enter:
?application.startuppath

And compare what you get to where you're placing the workbook.

====
On the other hand, I think I'd just keep that workbook in a nice common location
(on a network share). And then I'd have the VB program open that workbook when
required:

dim mySpecialWkbk as workbook
set myspecialwkbk = workbooks.open("\\somename\somename\somefolder\myf ile.xls")
....

(It'll have to be translated into VB, though.)

wrote:

Hi,

Our company just upgraded from Office 97 to Office 2003. We have a VB
application that sometimes needs to launch Excel and run some macros.
When it needs to do this it copies the .xls file containing the macros
to
..\program files\office11\xlstart and then launches Excel. When the
app is done running, it removes this file from XLStart. So far we
have upgrades about 600 people and this approach seems to be working
for almost everyone. However we have had 3 cases where the file gets
copied to the XLStart folder and Excel gets started, but the file in
XLStart doesn't open.

It sounds like by default, Office 2003 wants to look in ...\documents
and settings\current user\..... for the xlstart folder. When we try
physically copying the file to this location on the computers that
aren't working, it works fine. My question is, why does Excel know to
look in program files\office11\xlstart in most cases, but doesn't know
to look there for these 3 cases?

Because each user is going to have a different value for the current
user part of the path in documents and settings, we don't know how to
get our VB code to copy the file over to the XLStart in that location
so we would like to figure out how to fix things in cases where it
doesn't know to look in the Office11 folder.

I hope I explained myself clearly here. If you have any ideas, I
would sure appreciate hearing from you.

Thanks


--

Dave Peterson


All times are GMT +1. The time now is 10:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com