Sub RunWhenOpenDocument()
Select Case Range("Sheet1!A1").Value
Case "a"
Application.Run "INVENTRY.xls!newday.newday"
Case "b"
Application.Run "INVENTRY.xls!update.update"
Case Else
Range("Sheet1!C115").Select
End Select
End Sub
Save this macro in Sheet1, and in ThisWorkbook, under the event Open, insert
the line
Sheet1.RunWhenOpenDocument
Stephane Quenson
--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200708/1