I recently ran across a situation where if the user is editing a cell in a listbox and clicks the app’s close box, the app generates a runtime error. To get around the problem (in an admittedly ugly fashion), in the window’s Close handler I force a different control to get the focus. By doing this, the edits in the cell are lost, as they should be, and the runtime error is circumvented.
My question is this: is this really the best way to handle it or is there a “proper” approach?
Thanks.
BTW, if it makes any difference, I’m running 2018r3 on a Windows 10 system.
[quote=416303:@Dale Arends]I recently ran across a situation where if the user is editing a cell in a listbox and clicks the app’s close box, the app generates a runtime error. To get around the problem (in an admittedly ugly fashion), in the window’s Close handler I force a different control to get the focus. By doing this, the edits in the cell are lost, as they should be, and the runtime error is circumvented.
My question is this: is this really the best way to handle it or is there a “proper” approach?
Thanks.
BTW, if it makes any difference, I’m running 2018r3 on a Windows 10 system.[/quote]
Could you post the text that’s in the Runtime Error dialog?