Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need a crash testing
Message
From
06/07/1999 03:59:20
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
05/07/1999 17:45:13
Jorge Haro
Independent Consultant
Juarez, Mexico
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00237411
Message ID:
00237642
Views:
9
>Hi, I did get a crash, but only if I closed the document (Ctrl + F4, or clicking on the X of the document window), no crash with Alt + F4, or exiting excel; this with the code as is.
>
>If I change the lines you mentioned the program just hangs at:
>
>DO while IsWindow(lnExcelWindow) # 0 && Loop while our Excel window alive
>ENDDO
>
>that's where the debugger throws me anyway.
>
>VFP 6.0 SP3
>Excel 97
>Win 95a
Thanks to you all for testing. This is what we found and fixed :)
In the meantime we noticed that me and my partners were closing excel differently. I always used Alt+F4 and they always used Ctrl+F4 first.
Interesting if sheet is closed first and no releasing of Excel, window is alive. You can see it on tasks list, and detect with iswindow (but not with FindWindow). Even show it up with oExcel.visible = .t. but closing sheet immediately closes whole excel from visible environment.
After struggling with API *Window I did old days solution :) The workaround I now use is :
myHandle = fopen(lcTempExcelFile,12)
do while myHandle < 0
  myHandle = fopen(lcTempExcelFile,12) && Try to open temp xls read-write
enddo
=fclose(myHandle) && Excel released it
Release oExcel
Erase (lcTempExcelFile)
This one is working error free on all sites now :) Thanks again.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform