I have a userform that upon activation I resize. Every once in a while it will apparently re-activates and all the controls resize again in the form and become too large to fit on the form. There seems to be no rhyme or reason as to when or why this will happen.
A colleague uses the same workbook. Yesterday he said he had it do this several times. I had it happen to me once time yesterday after not doing it for several days. When it happened to me, I was replying to an email in Outlook. I can never replicate this, even if I do the exact same thing that occurred when it resized.
For now, when it happens, I close the form with the 'X' and reopen it, and all is fine.
What else would cause the userform to reactivate?
The only thing I can think of doing is having a public variable that I set to 1 when the userform first activates and then reset it to zero when the userform is closed normally by the user, then put a statement in the code that if the variable is 1 then exit the activate sub.
Any other ideas, as I am only a casual user of VBA and rely on the help from the program and the internet to figure out things I want to do.
A colleague uses the same workbook. Yesterday he said he had it do this several times. I had it happen to me once time yesterday after not doing it for several days. When it happened to me, I was replying to an email in Outlook. I can never replicate this, even if I do the exact same thing that occurred when it resized.
For now, when it happens, I close the form with the 'X' and reopen it, and all is fine.
What else would cause the userform to reactivate?
The only thing I can think of doing is having a public variable that I set to 1 when the userform first activates and then reset it to zero when the userform is closed normally by the user, then put a statement in the code that if the variable is 1 then exit the activate sub.
Any other ideas, as I am only a casual user of VBA and rely on the help from the program and the internet to figure out things I want to do.