>Cetin
>
>I can't seem to close the excel file using the following code
>
>The start of the program
>
>With thisform.OleControl1
> .Navigate2('file://c:\global\clientstats.xls')
> Do While .ReadyState # 4 && Wait for ready state
> EndDo
>endwith
>
>rest of program
>
>oExcel.Application.ActiveWorkbook.Save()
>With thisform.OleControl1
> .Navigate2('file://c:\global\global.htm')
> Do While .ReadyState # 4 && Wait for ready state
> EndDo
>endwith
>
>Followed by attempt to email clientstats.xls which it can't because the emailer says flie accessed denied
>
>Any ideas?
>
>Thanks
>
>Colin
Colin,
First try (not sure) releasing oExcel.
Generally what I do is to fire up a timer object which tries to gain RW access to xls file. When it does excel released it and I can do whatever like erasing.
Cetin