Quote:
Originally Posted by zomg
That is strange, can you paste the full workbooks.open line?
I don't have a copy of the workbook here but it uses the Workbooks.Open method on a module level object variable set to an Excel app in the previous lines with the filename set to a cell value. So it's something like
Module.Variable.Application.Workbooks.Open Filename:=Range("A1").value
I don't think there's a problem with the syntax since it works on every other computer I've run it on.
Quote:
Originally Posted by zomg
Is the version of excel different in this case?
Nope, at least I know it's Excel 2007. As far as any differences in add-ins or references I have no idea. It did have an issue at first with a missing reference (REFEDIT.DLL) because the offending computer had an older version of that file which we fixed by copying a new version to the appropriate directory.
Quote:
Originally Posted by zomg
Does it work if you don't set application.visible = false (assuming thats what you mean by invisible?)
Same problem with that line commented out.
Quote:
Originally Posted by zomg
Are both the workbooks in the same folder? if not are the paths set differently on this computer?
Different folders but the cell reference contains the full path to the workbook. There's also a check to see if the file exists and if not opens a prompt to find it so we put in a bad reference intentionally so that the cell reference could be set by actually navigating to the file and selecting it. The Workbooks.Open will never run unless it finds a file, and it does actually open the workbook, it just throws an error along with it.
Quote:
Originally Posted by zomg
Do you check if the workbook is open first before running workbook open?
Yes. Checked for any instances of EXCEL.EXE running in the task manager, opened Excel without opening a workbook to clear out that list of files that Excel says it can recover for you after a crash, closed Excel, rechecked task manager and started from there.
Quote:
Originally Posted by zomg
Have you tried not creating a new instance of excel and just running it from the same one? Is there a reason you don't do this anyway (aside from not being able to set it to invisible)
No, I wanted to try that at one point but I'm not the one physically troubleshooting this. It's on a computer 500 miles away with no internet access. I've spent 3 hours on the phone with a guy who maybe knows how to write a few formulas guiding him around the visual basic editor. So I wouldn't just be able to tell him to try opening the workbook in the first instance of Excel, I'd have to tell him where and what to type. I'd like to know if that works just because I'm curious but I wouldn't want to use it as a solution because I want to keep it invisible.
Sounds like it would be impossible for me to reproduce, if you get really stuck i'm happy to jump on teamviewer and have a look?[/QUOTE]
Yeah I can't reproduce it either. Teamviewer wouldn't work (see above) but thanks for the offer.