View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mike[_37_] Mike[_37_] is offline
external usenet poster
 
Posts: 20
Default Program not working after upgrade

have you checked that reportDate contains the string that you expect it to
contain, in the same format as your old operating system used?
Or have you checked the path is still the same, since you've upgraded?

hth

"Patrick I" wrote in message
...
The following line of code worked before I was upgraded to
Windows XP and Excel 2002.

Workbooks.Open
Filename:="C:\Inetpub\wwwroot\BCC\documents\2004_E _M_Calend
ar_" & reportDate & ".xls"

The program stops at the above line with the message:

Run-time error '1004':

Method 'Open' of object 'Workbooks' failed

The rest of the program works if I manually open the
workbook and continue with the rest of the code. Any
suggestion is appreciated. Thanks.