pro_vb thread: How to determine which control has focus
Hello Mark, well, the active control in FormA should not change unless you do something in FormB to modify it. If you indeed do so, because you show FormB as modal, just reset the focus to the component that had the focus before showing it. In FormA, your code should be like: Private Sub mnuMy_Click() On error resume next 'just in case Dim ctrl As Control Set ctrl = Me.ActiveControl FormB.Show vbModal ctrl.SetFocus End Sub Marco
|





