DC_Aarray2Excel cancel button inoperative
DC_Aarray2Excel cancel button inoperative
The cancel button in the progress window for DC_Array2Excel does not terminate the process of building the spreadsheet.
Re: DC_Aarray2Excel cancel button inoperative
Here is a fix.
Copy _DCFUNCT.PRG to your \exp19\source\dclipx folder.
Run BUILD19_SL1.BAT to rebuild DCLIPX.DLL
Copy _DCFUNCT.PRG to your \exp19\source\dclipx folder.
Run BUILD19_SL1.BAT to rebuild DCLIPX.DLL
- Attachments
-
- _dcfunct.zip
- (44.37 KiB) Downloaded 747 times
The eXpress train is coming - and it has more cars.
Re: DC_Aarray2Excel cancel button inoperative
Thanks, Roger, this destroys the dialog window.
But Excel is still running (oExcel not destroyed?).
The result is that the exe freezes until Excel is closed with 'task manager'.
Is it also possible to return .f. if lStatus = .f. to allow testing for a cancel?
But Excel is still running (oExcel not destroyed?).
The result is that the exe freezes until Excel is closed with 'task manager'.
Is it also possible to return .f. if lStatus = .f. to allow testing for a cancel?
Re: DC_Aarray2Excel cancel button inoperative
I don't see anything wrong with the code.
Also, I am not having that problem when I test the code.
I am totally bombarded with stuff right now.
How about helping me out and debug the code?
You can put WTF's in the DC_Array2Excel() function and help figure out why you are having this problem.
Also, I am not having that problem when I test the code.
I am totally bombarded with stuff right now.
How about helping me out and debug the code?
You can put WTF's in the DC_Array2Excel() function and help figure out why you are having this problem.
The eXpress train is coming - and it has more cars.
Re: DC_Aarray2Excel cancel button inoperative
After much trial and error, if this line:
oBook:SaveAs(cExcelFile,xlWorkbookNormal,cPassword)
is bypassed after testing lStatus and getting .f.,
either oBook cannot be closed and destroyed or oExcel cannot be 'quit' or destroyed, can't tell which,
and this locks the exe.
The 'cancel' button now exits the spreadsheet build, but creates a partially built spreadsheet because must still 'SaveAs'. Exiting the function with .f. (lStatus) allows me to warn the user that it didn't complete and/or erase the partial spreadsheet.
When you are less bombarded, hope you can fix it. Not having a cancel button could, under certain circumstances, build a spreadsheet for days.
oBook:SaveAs(cExcelFile,xlWorkbookNormal,cPassword)
is bypassed after testing lStatus and getting .f.,
either oBook cannot be closed and destroyed or oExcel cannot be 'quit' or destroyed, can't tell which,
and this locks the exe.
The 'cancel' button now exits the spreadsheet build, but creates a partially built spreadsheet because must still 'SaveAs'. Exiting the function with .f. (lStatus) allows me to warn the user that it didn't complete and/or erase the partial spreadsheet.
When you are less bombarded, hope you can fix it. Not having a cancel button could, under certain circumstances, build a spreadsheet for days.
Re: DC_Aarray2Excel cancel button inoperative
Comment out 3 lines of code starting at line 4995.
That will probably fix it.
That will probably fix it.
Code: Select all
/*
IF !lStatus
BREAK
ENDIF
*/
The eXpress train is coming - and it has more cars.
Re: DC_Aarray2Excel cancel button inoperative
That's what I did.
And end the function with " Return lStatus " so you can test for an early exit.
And end the function with " Return lStatus " so you can test for an early exit.