Thanks, Chip. Where should I place the subs, within either Child1.xls &
Child2.xls? Is it within ThisWorkbook? Pl advise.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Chip Pearson" wrote in message
...
Max,
Try something like the following. If Parent.xls is already open, it does
nothing. If Parent.xls is not open, it opens Parent.xls, schedules an
OnTime to cause Excel to re-open the Child.xls workbook, then closes
itself.
Sub Auto_Open()
Dim WB As Workbook
On Error Resume Next
Set WB = Workbooks("Parent.xls")
Select Case Err.Number
Case 0
' Parent.xls already open
Case 9
' Parent.xls is not open
Workbooks.Open Filename:="C:\Parent.xls"
Application.OnTime Now, Chr(39) & ThisWorkbook.Name & Chr(39) &
"!DoNothing"
ThisWorkbook.Close savechanges:=True
Case Else
MsgBox "Error: " & CStr(Err.Number) & vbCrLf & _
Err.Description
End Select
End Sub
Sub DoNothing()
' no code required.
End Sub
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting LLC
www.cpearson.com
(email on the web site)