Enabling an Addin Button From a Modeless Form

Discussion created by bruce.nielsen on Dec 19, 2013
Latest reply on Jan 15, 2014 by dz3164244
I have an Addin button (called Analyze) that processes some data, then calls a modeless form. I want the button to be disabled until the user closes the form, or else it will be possible for the user to accidentially have multiple instances of the form open at the same time.

To disable the button I use
Me.Enabled = False
in the button's OnClick event. What I can't figure out is how to reference the button from within the form. I was planning on changing the button's Enabled attribute back to True in the form's FormClosing event, unless someone knows of a better way.

Any Ideas?