The double click event is of the worksheet mwksWorkSheet, yet the code never sets that variable. Adding a line to the Property Set routine takes care of that.
The other problem is that e is dimensioned at the procedure level. When End Sub (of sub testEventsClass) exicutes, e passes out of scope, so there is no mwksWorkSheet to respond to events.
To make e persisistant, it has to be either a Public variable or Static.
mwkesWorkSheet is the whole sheet so, to make it respond only if the double clicked cell is in r, Application.Intersect should be used.
Public Sub testEventsClass()
Static e As EventRange
Set e = New EventRange
Dim r As Range
Set r = Range("A1")
Set e.Range = r
End Sub
Private WithEvents mwksWorkSheet As Excel.Worksheet
Private r As Range
Public Property Set Range(ByVal value As Range)
Set r = value
Set mwksWorkSheet = value.Parent
End Property
Public Property Get Range() As Range
Set Range = r
End Property
Private Sub mwksWorkSheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Not Application.Intersect(Target, r) Is Nothing Then
MsgBox "Range " & Target.Address & " has been double clicked"
End If
End Sub