>Fabio is right. I just test it.It is because that property point to object within the form where it is created. After destroing the form that property disapears and the the object it holds also is gone. If this property holds an external to form object you can't close the form until external object is alive :o)))
Yes, I just tested it too :) Ok, one thing less to worry about.
But actually Al has to combine your's and Glenn's solution.
E.g. Textbox class should set thisform.oLastActiveControl = this in its GotFocus method. Because I found, that if you use Tab to move to command button, the code is not firing.
If it's not broken, fix it until it is.
My Blog