I currently use this code if i am logged on , it stops the enablevents and alerts if i have opend the document, if someone else opens it the enablevents & Display alerts is true.Private Sub M() Environ$ ("username") Dim sID As String sID = LCase(Environ$("username")) If sID = "046439" Then Application.EnableEvents = False Application.DisplayAlerts = False Else Application.EnableEvents = True Application.DisplayAlerts = True End If End Sub
I need this code to only work if the workbook "abc.xls" is open in the background rather than who opens it.
can anyone help