Add-In Distribution Problems - excel vba

  • Thread starter Thread starter scleary
  • Start date Start date
S

scleary

I have created an Add-In and put it in the XLSTART directory. I
contains several procedures and creates a new menu item. I have als
created a sheet called INSTALL.XLS which has the following code:

Private Sub Workbook_Open()
Dim oXL As Object
Dim oADDIN As Object
Set oXL = CreateObject("EXCEL.APPLICATION")
oXL.Workbooks.Add
Set oADDIN = oXL.AddIns.Add(Application.Path
"\xlstart\LOCAL807.XLA", True)
oADDIN.Installed = True
oXL.Quit
Set oXL = Nothing
End Sub

My intention was for the user to open it and automatically have the ad
in selected (in the Add-In ) box.

I created the code on my machine windows xp/excel 2000. The firs
machine I am trying to install it on is Windows 2000 / Excel 2000.
Right now the XLA is in c:\program files\Microsof
office\office\xlstart. The Add in is not coming up in the list o
add-in, but I am able to run the procedures within it without
problem. I can also run the INSTALL.XLS procedure and it is sayin
that the oADDIN.Installed = true.
I have played around with all different directories and have had i
come up in the list of Add-In’s, but not be checked (with th
procedures within it still working) and atleast one time I have opene
up a completely different workbook and have had the check appear.

I need to be able to deploy this to different users, so I was hoping t
get the following installation procedure to work:

Copy the local807.xla file to the excel (xlstart) directory
Open up the Install.xls file (which would just have a welcome scree
and then tell them they could get out

I need to know exactly where I need to put the XLA file. On th
install machine the default directory is C:\DOCUMENTS AN
SETTINGS\ADMINISTRATOR.SUSAN\MY DOCUMENTS

What am I missing???

Thanks!!!
 
I'd take a look at the way Jan Karel Pieterse did it with the namemanager
utility.

You can find it at:
NameManager.Zip from http://www.bmsltd.ie/mvp

He has an installation workbook included in the zip file.
 
Hi Susan,
I have created an Add-In and put it in the XLSTART directory. It
contains several procedures and creates a new menu item.

Addins do not belong in the XLSTART folder, they belong an a folder
designated for addins. Which folder that is depends on your system
install and Excel version. Mine is:

C:\Documents and Settings\Pieterse\Application Data\Microsoft\AddIns

But it might also be:

C:\Program Files\Microsoft Office\Office\Library

(addins in this directory will be available to all users on a system)

The setup file in my name manager utility figures out the user's addin
folder and uses that.
Also, my code assumes the addin to be in the same folder as the setup
file. You can easily change that so the addin can be (e.g.) on a
network share. You can then mail your setup file to all users, which
will pull the addin from the network share.

Regards,

Jan Karel Pieterse
Excel MVP
www.jkp-ads.com
 
Back
Top