Need to reload an addin for each file

Need to reload an addin for each file

TONELLAL
Collaborator Collaborator
486 Views
2 Replies
Message 1 of 3

Need to reload an addin for each file

TONELLAL
Collaborator
Collaborator

Hello,

I have an addin which displays a form, then when I clic a button operations are launched.

The form is no modal, so I display it, select objects, apply, selct objects, apply,... then close the form with another button (form.close).

All functions, but only on the first opend file : I open the file, use the addin, close the form. I open another file, the addin is always loaded, but when I clic on the icon to display the form nothing happens... I have to unload the addin and reload it.

Where is the problem ?

 

 

0 Likes
Accepted solutions (1)
487 Views
2 Replies
Replies (2)
Message 2 of 3

Ralf_Krieg
Advisor
Advisor

Hello

 

I think with form.close the form is destroyed, so a form.show later won't work. Try from.hide instead form.close.


R. Krieg
RKW Solutions
www.rkw-solutions.com
0 Likes
Message 3 of 3

TONELLAL
Collaborator
Collaborator
Accepted solution

I thought it was something like that...

 

The Onexecute event is only :

Sub oRibbonButton_NewButton_OnExecute(....)

    form.Show()

EndSub

 

BUT...

...the form is not delared in the sub. I moved the declaration in the sub, it seems to be right !

0 Likes