;
;-\)
This code works for ~20 sets of excel workbooks. ONE of the sets (a single
workbook) always crashes the workbook, with a request to contact MS with the
error report. The last crash gave me a DDE server crash error.
Is there any thing in the sheet that would cause this?
For i = 1 To rsMaster.RecordCount
'Set xl(i) = New Excel.Application 'Early binding
Set xl(i) = CreateObject("Excel.Application") 'Late Binding
With xl(i)
If admin Then 'hide from user?
.Visible = True
Else
.Visible = False
End If
.Application.WindowState = xlMinimized
.Application.DisplayAlerts = False
.Workbooks.Open FileName:=(pathExcel & rsMaster!Source),
UpdateLinks:=0, ReadOnly:=False
End With
rsMaster.MoveNext
Next i
'...much work done
Set rsLbl = xl(i).Application.Run("getRs", rsLbl) 'call Excel Function
'...much work done
'now end
For Each x In xl()
x.ActiveWorkbook.Saved = True
x.Quit
Set x = Nothing
Next
workbook) always crashes the workbook, with a request to contact MS with the
error report. The last crash gave me a DDE server crash error.
Is there any thing in the sheet that would cause this?
For i = 1 To rsMaster.RecordCount
'Set xl(i) = New Excel.Application 'Early binding
Set xl(i) = CreateObject("Excel.Application") 'Late Binding
With xl(i)
If admin Then 'hide from user?
.Visible = True
Else
.Visible = False
End If
.Application.WindowState = xlMinimized
.Application.DisplayAlerts = False
.Workbooks.Open FileName:=(pathExcel & rsMaster!Source),
UpdateLinks:=0, ReadOnly:=False
End With
rsMaster.MoveNext
Next i
'...much work done
Set rsLbl = xl(i).Application.Run("getRs", rsLbl) 'call Excel Function
'...much work done
'now end
For Each x In xl()
x.ActiveWorkbook.Saved = True
x.Quit
Set x = Nothing
Next