Scenario:
Export file to excel.
Open Excel sheet.
Again export to Excel (same filename)
Than OLE error 0x80030021 'Schending van vergrendelingsrechten' occurs.
Can I catch that OLE-error?
-Bart
I think my Dutch goes far enough to understand that you're running into an access violation. Have you tried to open that very file in Excel before you attempted to open / create it again? If you export (as in COPY TO ... TYPE XLS) VFP will create a new file, i.e. open that file exclusively, which will conflict with Excel's import mechanism. Where about in your code are you exporting? If it is within an object of any sort (for instance a form) you can use the error event to catch that error, otherwise use ON ERROR DO myHandler WITH Error(). It's then up to you what to do with the error and no message will occur.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.