Workbook Contention
You might use a routine like this one to update the summary workbook:
Sub a()
Dim WB As Workbook
Dim Done As Boolean
Application.DisplayAlerts = False
While Not Done
Set WB = Workbooks.Open("c:\wb.xls", ReadOnly:=False, Notify:=False)
If Workbooks("wb.xls").ReadOnly Then
WB.Close False
Application.Wait DateAdd("s", 1, Now) ''Wait a second
Else
Done = True
''Write changes
WB.Close True
End If
Wend
End Sub
--
Jim Rech
Excel MVP
|