I have created a UserForm where the user is required to fill-in three fields. The macro attempts to auto-detect these fields’ values in the UserForm_Initialize() event, then displays the found values in the three fields, but the user can change them. The auto-detection takes a few seconds, though, and delays the appearance of the UserForm. I’d like the UserForm to appear with its fields blank before the auto-detection procedure, then have the auto-detection procedure fill the fields automatically. What would be the best way to do this? Making the UserForm non-modal makes the macro run without waiting for the user’s input, which is problematic. I don’t want to have an “auto-detect” button: this has to be done automatically.
I have created a UserForm where the user is required to fill-in three fields.
Share
Use the
Activate()event instead ofInitialize()🙂FOLLOWUP
No. It is not a bug 🙂 Try This. Add
Doeventsas shown below.HTH
Sid