View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default File exists but cannot open from Excel

Does the workbook contain a macro? I suspect that a firewall is preventing
the file from opening when the hyperlink is activated. Using window explorer
you are not going through the firewall. The firewall can do a lot of checks
from macros to obscene words inside the file.

I would first try to remove macros, then systematically delete items from
the spreadsheet until you find the offending item.

" wrote:

Hi,

Hope someone can help and that this is the correct place to post. Have
tried searching through google groups and MSDN.

I am using Excel 2003 and using vba to store a list of files (as
strings on a spreadsheet) from a server location. I then allow users
to search the file with Ctrl+F and open the file based on the name.

Over 30,000 files and a year of using it and no problems until today.
One .xls file will not open. Have opened the file through explorer
manually with no problem and no one else has it open. If I create a
hyperlink on a spreadsheet with the full server path etc, the
hyperlink doesn't work in the same way that workbooks.open doesn't and
ShellExecute doesn't also, same error cannot find file.

Have tried proving to myself that each of procedures are correct, i.e.
have tried one procedure each with workbooks.open, ShellExecute &
ActiveWorkbook.FollowHyperlink. I have tested the string by using
FileSystemObject.FileExists which returns true and I can Set a
dimension as the file and return all its properties like date
modified, name etc. and the .path matches the string.

Any ideas? Only seems to happen if the file is on a server location,
i.e. I copied the entire folder to my c: drive and works fine. I have
used GetFolder to prove that the folder can be opened using the
string.

Any help or possible known issues/resolutions that I can try would be
apreciated.

Thanks