The first way I learned to call a UserForm is to just use the name of the form:
[vba] FormName.show [/vba]
However, I've seen a bunch of code examples on the web which use "Class" style calling: you dim an Object as FormName, and then set the object as a new instance of the class object:
[vba] Dim frmMyForm As FormName
Set frmMyForm = New FormName [/vba]
Why would you do it the second way? Are there any advantages?
I suppose if you wanted to use multiple instances of the Form simultaneously, you'd have to use the second method.
When you use the first method, is VBA just creating a new instance of the form, and calling it "FormName"?
Any advice/explanation is appreciated.