Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Re: Excel is locked when download by using OLE

$
0
0

Appala,

 

 

 

I looked at some old programs of mine that use OLE2 interface. They do not issue the "QUIT" command to the Excel object as you do. They end the connection to excel in this way:

 

 

 

* Tell Excel to resume updating entire worksheet with each change

SET PROPERTY OF oExcel 'ScreenUpdating' = 1.

SET PROPERTY OF oExcel 'Visible' = 1.

 

* Disconnect from Excel

FREE OBJECT oExcel.

 

 

 

It seems too simple, but it has worked for many years.

 

I remember a problem from writing these programs that may be causing you trouble. If you must exit an OLE2 program from the debugger, sometimes an instance of the Excel application will continue to run on your PC. These instances are invisible and can lock excel data files.You may need to use the task manager on your PC to "End Task" and stop them.

 

Good Luck,

 

 

 

Juan


Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>