Application-level events aren't quite as convenient as document-level events.
Perhaps some sample code will help.
In a standard module:
Option Explicit
Public appEvents As clsAppEvents
Sub Initialize()
ThisDrawing.SetVariable "FILEDIA", 1
If appEvents Is Nothing Then
Set appEvents = New clsAppEvents
End If
End Sub
Sub Terminate()
Set appEvents = Nothing
End Sub
In a class module called clsAppEvents:
Private WithEvents m_objApp As AcadApplication
Private Sub Class_Initialize()
Set m_objApp = ThisDrawing.Application
End Sub
Private Sub Class_Terminate()
Set m_objApp = Nothing
End Sub
Private Sub m_objApp_SysVarChanged(ByVal SysvarName As String, ByVal newVal As Variant)
If SysvarName = "FILEDIA" Then
If newVal = 0 Then
If StrComp(ThisDrawing.GetVariable("CMDNAMES"), "SETVAR", vbTextCompare) <> 0 Then
ThisDrawing.SetVariable "FILEDIA", 1
End If
End If
End If
End Sub
You have to manually call the Initialize subroutine located in the standard module for this to work.