You can use
Unload thisworkbook.VBProject.VBComponents(index)
But you dont want to do this. Because you have to know exact index of UserForm. You can also check all vbcomponents' types in workbook and when you find the 3 for type for a component then you can understand that it is a userform and unload it.
I think using a specific name is easier. But if you have lots of userform and you dont know which is activated then you can apply this kind of code.