When moving from one MDI-child to another i don´t want some LostFocus events to be fired. I use the
=> If Screen.ActiveForm.hWnd <> Me.hWnd Then Exit Sub
on some controls but how to do this i i have a ActiveX-Control in a MDI-Child and the ActiveX-Control contins a grid where i don´t want the SS_LeaveCell event to be fired.
I have try with this sample but the Screen.ActiveForm is not set when I am in the grid in the ActiveX-Control.
Private Sub SS_LeaveCell(ByVal Col As Long, ByVal Row As Long, ByVal NewCol As Long, ByVal NewRow As Long, Cancel As Boolean)
If UserControl.Parent.hWnd <> Screen.ActiveForm.hWnd Then Exit Sub
'My other code after this....