L
Larry
I have a macro that inadvertently uninstalls all the installed Add-ins.
Nothing can be done about that. So I want to create code that, before
the macro runs, gets the index number of each of the currently installed
add-ins, and then, after the macro runs, uses those index numbers to
re-install the add-ins that have been uninstalled.
Let's say there are four add-ins in the Add-ins collection, and the
first and third Addin are currently installed. I run something like
this:
For Each myAddin In Application.AddIns
If myAddin.Installed = True Then
myAddin.Installed = False
X = myAddin.index
End If
Next myAddin
But of course after this code is run, X will only be equal to 3, the
index of the last addin that was installed. What code do I put in that
place that would reserve the index number of all of the add-ins that are
being uninstalled? And then how would I access those numbers to
re-install the add-ins later?
I've only used very simple arrays in the past so I'm not expert in
arrays at all. Though maybe an array would not be necessary.
Thanks for any help.
Larry
Nothing can be done about that. So I want to create code that, before
the macro runs, gets the index number of each of the currently installed
add-ins, and then, after the macro runs, uses those index numbers to
re-install the add-ins that have been uninstalled.
Let's say there are four add-ins in the Add-ins collection, and the
first and third Addin are currently installed. I run something like
this:
For Each myAddin In Application.AddIns
If myAddin.Installed = True Then
myAddin.Installed = False
X = myAddin.index
End If
Next myAddin
But of course after this code is run, X will only be equal to 3, the
index of the last addin that was installed. What code do I put in that
place that would reserve the index number of all of the add-ins that are
being uninstalled? And then how would I access those numbers to
re-install the add-ins later?
I've only used very simple arrays in the past so I'm not expert in
arrays at all. Though maybe an array would not be necessary.
Thanks for any help.
Larry