How can I make a form active? It's already on screen and visible, just not the active control. In particular, I don't want the current position or size of the form to change. But forms don't seem to have an activate method.
I tried:
but for some reason this actually halts code execution, and on some occasions crashes Excel.
I suppose I could save the .left, .top, .height and .width values for the form, then do a .show and then restore them, but even with Application.ScreenUpdating = False is still shows the form in the middle of the screen for a instant or two before putting it back to where it belongs.
I tried:
Code:
ThisWorkbook.VBProject.VBComponents.Item (frmVariable.name).Activate
I suppose I could save the .left, .top, .height and .width values for the form, then do a .show and then restore them, but even with Application.ScreenUpdating = False is still shows the form in the middle of the screen for a instant or two before putting it back to where it belongs.