VBA runtime error 1004; Method of 'open' of object 'workbooks' failed

Joined
Oct 12, 2011
Messages
1
Reaction score
0
Hi all;

for this project, I'm exporting one sheet from a workbook into 40 separate workbooks located in a folder residing on a server. I've tested the procedure out on my laptop (setting up the filepath accordingly) without an issue. However after implementing the solution on the clients pc (and setting up the workbook folder/files where it belongs on the server and changing the filepath to match), a 1004 runtime error (method of 'Open' of object 'Workbooks' failed) occurs approximately half-way through the process. I've tried to emulate the error by running the procedure on my system (my initial thought was that one of the files were named incorrectly- not), but as I pointed out, it ran flawlessly. I've ruled out a filepath error in the clients code, otherwise the procedure would have bombed while opening and copying into the first file (I'd post code, but as mentioned, it works great on my system and only barfs halfway through on the clients).

This is not a quick process- it takes 20 minutes to complete. Does anyone know of an issue that might exist along the lines of this particular error relating to hardware (memory for example)? :confused:

Thanks in advance
 
Joined
Sep 3, 2008
Messages
164
Reaction score
5
adwatts,

What method of loop are you using? Are you holding a value in a variable for the workbook while you write the spreadsheet? It would be helpful to have code or at least psudocode.

Stoneboysteve
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top