title: Automatically execute some code after the UserForm is drawn
body: <p>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 <code>UserForm_Initialize()</code> 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.</p>