Greetings,
I have an application that uses a series of userforms. One of my subroutines contains code to unload any forms that are currently loaded so as to reset the project:
The above code works fine. However, I have another sub that is supposed to unload any loaded userforms except a specific one:
For Each form In UserForms
If form.Name <> UserForms(LandingPage).Name Then
Unload form
End If
Next form
With this code I get the ol' runtime error 438 "Object does not support this property or method". I have also tried it this way with the same result:
To summarize, I'm trying to unload a series of userforms via a loop, and need to refer to a unique property to avoid unloading a specific userform. It does not appear that I can refer to userform.name in the code (".Name" doesn't even appear as an available property in Intellisense), so I'm wondering how to do this properly.
Thanks!