For my workbook, I want a 'splash screen' to display immediately after the workbook has been opened. The workbook takes a 10-12 seconds to run a bunch of code when it is first opened, so I want to inform the user that the workbook is loading, so they don't think something is wrong. I created a UserForm, and placed code to open it in the Workbook_Open sub inside the ThisWorkbook module.
The UserForm appears, though not as immediately as I would like. (That's actually a smaller issue at the moment, but if anyone has any thoughts as to why it might be taking a few seconds for the UserForm to appear, even though it is the ONLY thing inside the Workbook_Open sub, I'm all ears.)
I would like the UserForm to automatically unload (disappear) once all of the code inside its Initialize sub is finished running. I tried putting 'Unload Me' at the end of the Initialize sub, but it gave me a Run-time error 91.
I don't want the user to be able to close the UserForm on their own, so I have made it to nothing happens if they click the X in the top right.
I know it's possible to do this, because I've seen another workbook that does it, but the code to that workbook is password protected, so I can't see how they do it. I have searched online, but haven't had any luck finding an answer.
Code:
Private Sub Workbook_Open()
LoadingUserForm.Show
End Sub
The UserForm appears, though not as immediately as I would like. (That's actually a smaller issue at the moment, but if anyone has any thoughts as to why it might be taking a few seconds for the UserForm to appear, even though it is the ONLY thing inside the Workbook_Open sub, I'm all ears.)
I would like the UserForm to automatically unload (disappear) once all of the code inside its Initialize sub is finished running. I tried putting 'Unload Me' at the end of the Initialize sub, but it gave me a Run-time error 91.
I don't want the user to be able to close the UserForm on their own, so I have made it to nothing happens if they click the X in the top right.
I know it's possible to do this, because I've seen another workbook that does it, but the code to that workbook is password protected, so I can't see how they do it. I have searched online, but haven't had any luck finding an answer.