![]() |
SaveAs works on one PC, not another. "Save" not really an option. What to do?
I have an app that uses Office Automation and that until several weeks ago
worked fine on my desktop and on my laptop. Now it works fine on my laptop, but on my desktop it crashes. The app has an open XL workbook and when I attempt to execute the line oxlWks.Application.ActiveWorkbook.SaveAs fileName:=fname, FileFormat:=xlNormal it gives me an error. Either the error is "the server threw an exception" or "Method SaveAs failed" . Part of the problem is that this XL workbook is created by a 3rd-party ActiveX component that is quite old and so it creates the workbook in Excel 5.0 format. So I use SaveAs rather than Save so that I can overwrite the file with the current Office 2000 format. I should point out that the latest variant of the CoolWebSearch trojan has invaded my system and using standard tools (AdAware, Spybot, HijackThis, CWshredder) have not fixed the problem. So that might be the cause, or it could be something else. My Desktop and Laptop both have the same version of Office though the laptop uses WinNt and the Desktop WinXP. I cannot delete the copy of the workbook on my HD and then do the SaveAs, because I opened that file to begin with (it is the same file that I am working with). I could save this file with the correct fmt and a temporary name then delete the original file and rename this one, but that strikes me as an inelegant solution. So, what other options do I have? There appears to be no way to use the Save command and at the same time to specify changing the fileformat from Xl 5.0 to the current version. SaveAs bombs out and there are lots of threads in the Google archives about this, but no solution that seems to make sense to me (other than try early binding rather than late binding). Does anyone else have an idea about what might be causing this and how I can fix it? <end of rambling post Thanks. CA |
All times are GMT +1. The time now is 11:25 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com