Strangely enough, if the file does not exist, Excel throws a 1004 File not found error rather than the 'real' file not found error which is Error 53.
Are you absolutely sure the file you're referencing exists and is not corrupt?
Hi all.
Before I decided to write this post, I had a look trying to google my stupid error, but I couldn't find anything that looks exactly like my issue.
The thing is that on my computer at work (windows 7 enterprise with office 2007 professional) the code runs without any problem.VB:Workbooks.Open Filename:="c:\files\clients.xlsx" Workbooks("clients.xlsx").Worksheets(1).Range("a1" & ":x500").Copy _ Workbooks("cash").Worksheets(2).Range("A1")
And when I opened the same file on my laptop (same SO, same office) appear the following error: Run-time error '1004' Method 'Open' of object 'Workbooks' failed.
Please! Help!
Thank you in advance.
Gabi
P.S. By the way. Very nice job with this site, guys!
Strangely enough, if the file does not exist, Excel throws a 1004 File not found error rather than the 'real' file not found error which is Error 53.
Are you absolutely sure the file you're referencing exists and is not corrupt?
hmmm...
strangely enogh, you were right. that file was corrupt.
I've spent a whole day trying to figure it out.
Thank you very much.
Best regards,
Gabi
I have experienced this same issue and the resolution was to do a "File/Save As" and re-save the file on your drive. This enables excel to "see" the drive mapping where it is saved and will permit the code to run.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks