Excel 2007
I have a user form that allows the user to select an output cell using the RefEdit control. For the most part it works great, but every now and then the RefEdit control appears behind the user form. When this happens, there is nothing the user can do to get back to the form, because after selecting a cell they must click the Return button on the RefEdit Control. This completely locks Excel, and because focus is on the spreadsheet the code cannot be forced to stop. The only way out is to force Excel to close with the task manager.
I tried to simply hide the form with the control's DropButtonClick event, but when the form hides it also hides the RefEdit control. Luckily in this situation it does not lock up excel, the form just disappears into oblivion.
Does anyone know if you can set the Z-order of the RefEdit control once it appears on the spreadsheet? I say Z-order, but I may be mistaken. I'm referring to the pecking order of who appears on top of who.
-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]
I have a user form that allows the user to select an output cell using the RefEdit control. For the most part it works great, but every now and then the RefEdit control appears behind the user form. When this happens, there is nothing the user can do to get back to the form, because after selecting a cell they must click the Return button on the RefEdit Control. This completely locks Excel, and because focus is on the spreadsheet the code cannot be forced to stop. The only way out is to force Excel to close with the task manager.
I tried to simply hide the form with the control's DropButtonClick event, but when the form hides it also hides the RefEdit control. Luckily in this situation it does not lock up excel, the form just disappears into oblivion.
Code:
Private Sub rfeOutputCell_Change()
If Not blnLoading Then
frmProcessHistory.Show False
End If
End Sub
Private Sub rfeOutputCell_DropButtonClick()
frmProcessHistory.Hide
End Sub
Does anyone know if you can set the Z-order of the RefEdit control once it appears on the spreadsheet? I say Z-order, but I may be mistaken. I'm referring to the pecking order of who appears on top of who.
-JTBorton
Well, You can try banging your head against the wall, but you just end up with lost-time injuries and damaged equipment. [M. Passman]