From: Christer on
After changing our environment and upgrade to Vista and Office 2007 my code
for opening a number of Excel workbooks stop working and it says somthing
like "Cant find the file". The path to the file is correct and works if I use
it manualy when I open the file in Excel, but when it is used in code it
doesn't work.
The path to the workbook is retrieved from the system using
ThisWorkbook.Path plus the filename as a constant. The path looks like this;

"\\sesofsh01\SESO\AZS\Directories\SESOC540-NSP\KPI - NSP
månadsrapporter\KPI\Sortimentklassning & Lagervärdering\ELLA\ELLA.xlsx"
(there are some special Swedish characters within the path)

The same code works properly in an other environment with Vindows 7 with
Office 2007 and another path.

Can anyone give me a hit?

Thanks
Christer
From: JLGWhiz on
It could be the backslash (\) before the file name. Either one too many or
it does not have one in the code. i.e. myPath & "\" & fileName could put
one too many back slashes in and myPath & fileName could omit a needed
backslash.


"Christer" <Christer(a)discussions.microsoft.com> wrote in message
news:2E22E6BA-F9E4-4B6D-B321-87295BC56E49(a)microsoft.com...
> After changing our environment and upgrade to Vista and Office 2007 my
> code
> for opening a number of Excel workbooks stop working and it says somthing
> like "Cant find the file". The path to the file is correct and works if I
> use
> it manualy when I open the file in Excel, but when it is used in code it
> doesn't work.
> The path to the workbook is retrieved from the system using
> ThisWorkbook.Path plus the filename as a constant. The path looks like
> this;
>
> "\\sesofsh01\SESO\AZS\Directories\SESOC540-NSP\KPI - NSP
> m�nadsrapporter\KPI\Sortimentklassning & Lagerv�rdering\ELLA\ELLA.xlsx"
> (there are some special Swedish characters within the path)
>
> The same code works properly in an other environment with Vindows 7 with
> Office 2007 and another path.
>
> Can anyone give me a hit?
>
> Thanks
> Christer


From: JLGWhiz on
P.S. The Swedish alphabet characters should not affect recognition of a
path and file name in the English environment.


"Christer" <Christer(a)discussions.microsoft.com> wrote in message
news:2E22E6BA-F9E4-4B6D-B321-87295BC56E49(a)microsoft.com...
> After changing our environment and upgrade to Vista and Office 2007 my
> code
> for opening a number of Excel workbooks stop working and it says somthing
> like "Cant find the file". The path to the file is correct and works if I
> use
> it manualy when I open the file in Excel, but when it is used in code it
> doesn't work.
> The path to the workbook is retrieved from the system using
> ThisWorkbook.Path plus the filename as a constant. The path looks like
> this;
>
> "\\sesofsh01\SESO\AZS\Directories\SESOC540-NSP\KPI - NSP
> m�nadsrapporter\KPI\Sortimentklassning & Lagerv�rdering\ELLA\ELLA.xlsx"
> (there are some special Swedish characters within the path)
>
> The same code works properly in an other environment with Vindows 7 with
> Office 2007 and another path.
>
> Can anyone give me a hit?
>
> Thanks
> Christer