ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Application.Path in Excel 2k and 2002 (https://www.excelbanter.com/excel-programming/282325-application-path-excel-2k-2002-a.html)

Simon[_12_]

Application.Path in Excel 2k and 2002
 
Hi,

I use the following line to select a file to be opened in a piece of
VB:

dirpathIn = Application.Path + "\Blank Price List v1.1.xls"
'where the blank price list sheet is located

This works perfectly on the 5 or so systems running Win2k and Office
2k/Excel 2k on different build levels, different ages, different
general installations etc.

However, it does not seem to work on the only machine that has XP and
Office 2002/Excel 2002 and I need to hard code the path for the line
to work.

Question:
Is this a known 'feature' of the 2k/2002 migration or have I just left
something out....

Any help and suggestions gladly received.

Regards,

Simon

email:
removing 'junk' please

Tom Ogilvy

Application.Path in Excel 2k and 2002
 
It seems odd to use application.path for this. Maybe you should be using
ThisWorkbook.Path.

--
Regards,
Tom Ogilvy

"Simon" wrote in message
om...
Hi,

I use the following line to select a file to be opened in a piece of
VB:

dirpathIn = Application.Path + "\Blank Price List v1.1.xls"
'where the blank price list sheet is located

This works perfectly on the 5 or so systems running Win2k and Office
2k/Excel 2k on different build levels, different ages, different
general installations etc.

However, it does not seem to work on the only machine that has XP and
Office 2002/Excel 2002 and I need to hard code the path for the line
to work.

Question:
Is this a known 'feature' of the 2k/2002 migration or have I just left
something out....

Any help and suggestions gladly received.

Regards,

Simon

email:
removing 'junk' please





All times are GMT +1. The time now is 09:07 PM.

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