How do I load every UserForm without having to call .Show individually?
- by Daniel Cook
I wanted to figure out how you could load every UserForm without having to call Userform1.Show UserForm2.Show etc. This was inspired by comments on this answer: Excel VBA UserForm_Initialize() in Module.
I found this method suggested in a few places:
Sub OpenAllUserForms()
Dim uf As UserForm
For Each uf In UserForms
uf.Show
Next
End Sub
However, no Userforms display regardless of how many are attached to the workbook. When I stepped through the code I determined that the UserForms collection is empty!
How can I load each Userform without having to explicitly show each one?