ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Cannot find path! (https://www.excelbanter.com/excel-programming/447545-cannot-find-path.html)

Bobby[_4_]

Cannot find path!
 
I recently moved from Excel 2003 to Excel 2010. My VBA application reside on a network. At the beginning I define global constant like this:
Public Const pathSAP As String = "K:\Indic_Entr\interne\SAP\"

With 2003 everything worked fine. Now I get an error message saying that it cannot
fine the path. I'm the only one?
Is there a solution for this?
thank's ahead!

Auric__

Cannot find path!
 
Bobby wrote:

I recently moved from Excel 2003 to Excel 2010. My VBA application
reside on a network. At the beginning I define global constant like
this:
Public Const pathSAP As String = "K:\Indic_Entr\interne\SAP\"

With 2003 everything worked fine. Now I get an error message saying that
it cannot fine the path. I'm the only one?
Is there a solution for this?
thank's ahead!


Post your code. More than just one line.

--
- Seen anything remotely raise looking lately?
- Only when I raise my eyebrows when you say some crazy ****.

Bobby[_4_]

Cannot find path!
 
On Thursday, November 1, 2012 7:04:40 PM UTC-4, Bobby wrote:
I recently moved from Excel 2003 to Excel 2010. My VBA application reside on a network. At the beginning I define global constant like this:

Public Const pathSAP As String = "K:\Indic_Entr\interne\SAP\"



With 2003 everything worked fine. Now I get an error message saying that it cannot

fine the path. I'm the only one?

Is there a solution for this?

thank's ahead!


I found the reason and the solution to this situation. For an unknown reason I did not fully qualified the name of a Workbook with the VBA function Workbooks.Open Filename.
E.I: Workbooks.Open Filename:=test
The funny part is that it worked well with Excel 2003 VBA and not with Excel 2010. I just added the extension of .XLS and everything when fine!

E.I: Workbooks.Open Filename:=test.XLS
Hoping this will help somebody!


All times are GMT +1. The time now is 03:38 PM.

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