hi, Radu !
Hi. An excel file is opened by people, but also by code from a VB application.
I would like the code in Workbook_Open to run whenever the file is opened by a human
but not to run when the file is opened by automation.
Any ideas ?
(i.e.)
Private Sub Workbook_Open()
If Not Application.UserControl Then Exit Sub
' here your normal actions ...'
End Sub
hth,
hector.