Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Excel.Save() or SaveAs() fails with error 1426
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP1
OS:
Windows XP SP2
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01307589
Message ID:
01307642
Views:
12
>>Could you check in Task Manager whether instances of other hidden Excel.exe are running? It might be that you did not close them properly on the previous run.
>>
>>Also, I would modify your code to avoid additional Excel childs objects:
>>
>>oExcel = CreateObject("Excel.Application")
>>with oExcel
>>     .DisplayAlerts = .F.
>>     .Workbooks.Add()
>>     with .ActiveSheet
>>         .Cells(1, 1).Value = "AAA"
>>         ..........
>>     endwith
>>     .ActiveWorkbook.SaveAs("C:\Test.xls")
>>      .Quit()
>>endwith
>>oExcel=NULL
>>release oExcel
>>
>
>Good idea,
>
>Apparently on one of the 2 problem sites (the problem goes away when they re-boot). So this doesn make sense. Thanks.

I cannot see why it doen't make sense: how would you then explain that reboot helped? My guess is that while rebooting the hanging Excel instancies were closed.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform