Thread: Addin Install
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
tjh tjh is offline
external usenet poster
 
Posts: 96
Default Addin Install

Yes, in many cases I would be re-versioning the addin. However for new users
it would be an initial setup. What if the addin exist on the users computer,
but is not installed? How should I check for this? Also, concerning deleting
the add-in would that code be somewhat like:
Application.AddIns.delete Filename:=(the file name on the users C drive
under application data)

Thank you,






"Jim Thomlinson" wrote:

Check if the addin is currently installed. If it is then uninstall it and
delete it. You can then add your new addin version back with no problems (I
assume you are re-versioning the addin?)...
--
HTH...

Jim Thomlinson


"tjh" wrote:

Yesterday you helped me to determine how to install an add-in through vba,
thank you for that.

Now I am trying to get past the alert boxes which ask if I would like to
overwrite the add-in if it currently exists. The two messages I get a
"Copy XXXX.xla to the add-ins folder?" (Yes/No/Cancel), and "A file named
XXXX.xla already exists. Do you want to replace it?" (Yes/No/Cancel).

Is there a way to program the code not to ask these questions? It will not
work if I set Application.DisplayAlerts = False because it defaults to
answering "No." Or at least the way I have it running. How can I correct the
code to answer "Yes," but not display the alerts? Below is an example of what
I am currently using.

Thank You,

Sub AdinInstall1A()

Application.DisplayAlerts = False

On Error Resume Next
Application.AddIns.Add Filename:="C:\XXXX.xla"
Application.AddIns("XXXX").Installed = True

Application.DisplayAlerts = True

End Sub