declare the class as withevents i.e:
VB Code:
  1. Dim WithEvents objClass As ClassName