Reputation: 2313
I have a UserForm that loads, but when I click the cancel button it loads another one of my UserForms. The only code associated with my cancel button is:
Private Sub CommandButton1_Click()
Me.Hide
End Sub
Is there something else I can put in there that doesn't make that UserForm load?
Upvotes: 0
Views: 88
Reputation: 9193
Go to your code behind and right click on the form class that keeps getting loaded. Select "Find all references" after you right click it and a list will be displayed (usually on the bottom of visual studio) with all the places in the code that reference that form. You may find that it's being loaded in some form close event or something wierd like that. Without more information that's the best I can do for you.
Upvotes: 1