ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Crash on every 2nd run (https://www.excelbanter.com/excel-programming/278225-crash-every-2nd-run.html)

Christof[_4_] September 29th 03 07:57 AM

Crash on every 2nd run

I get the following behaviour:

In a macro, I open a word doc, and close it again with
the following code:

'open word document
Dim infoDocument As Object
Set infoDocument = CreateObject("Word.Basic")
On Error Resume Next
Set infoDocument = Word.Documents.Open(fileAddress,0,
True, False)

If Err.Number = 0 Then

'do some stuff

'Close the document

All times are GMT +1. The time now is 08:01 PM.

Powered by vBulletin® Copyright ©2000 - 2021, Jelsoft Enterprises Ltd.