hicksi
Board Regular
- Joined
- Mar 5, 2012
- Messages
- 214
- Office Version
- 365
- 2021
- Platform
- Windows
I have an Excel sheet that is (mostly) controlled through UserForms.
There is one particular UserForm that is often NOT set active during the processes.
Ie, the AutoExec goes through a number of procedures to create a backup, purge backup copies, validate (and correct and sort) the data, and then show the first UserForm.
Mostly, the first field on the UserForm is activated, AND the form itself is active, so the user can enter data.
But sometimes, while the form appears to be active, the title is greyed and keying data doesn't show data in the field (ie, the "active" piece of the PC is somewhere else. If the user clicks on the form, all is well.
But what I NEED to do is ensure that the form is truly the active form so the user doesn't start keying data into the nowhere-land.
Is there a DoEvents or some command that will ensure that the cursor is IN that particular form?
There is one particular UserForm that is often NOT set active during the processes.
Ie, the AutoExec goes through a number of procedures to create a backup, purge backup copies, validate (and correct and sort) the data, and then show the first UserForm.
Mostly, the first field on the UserForm is activated, AND the form itself is active, so the user can enter data.
But sometimes, while the form appears to be active, the title is greyed and keying data doesn't show data in the field (ie, the "active" piece of the PC is somewhere else. If the user clicks on the form, all is well.
But what I NEED to do is ensure that the form is truly the active form so the user doesn't start keying data into the nowhere-land.
Is there a DoEvents or some command that will ensure that the cursor is IN that particular form?