How to create a "xla" add-ins and active it.

  • Thread starter Thread starter JohnDing
  • Start date Start date
J

JohnDing

I disigned several user-defined function and I'd like it
could be automatically installed to others PC, so I need
the function to create a "xla" file and use Addins
("abc").installed=True to active it. but I failed. below
is my codes, pls help to diagnose.

'--------------------------------
Sub LoadXLA()
Dim AddInPath As String
Const xlaFile As String = "abc.xla"
AddInPath = "C:\Documents and Settings\user\Application
Data\Microsoft\AddIns\"
If Dir(AddInPath & xlaFile) = "" Then
WB.SaveAs AddInPath & xlaFile, FileFormat:=xlAddIn
End If
AddIns("abc").Installed = True
End Sub
'--------------------------------
 
To create an addin, you simply save a normal workbook with your code as a
file of type addin.

To activate it, just load it via Tools>Addins, and browse to find it. Check
the entry in the addin list, and it will then be available.
 
Thanks! I will try...
-----Original Message-----
To create an addin, you simply save a normal workbook with your code as a
file of type addin.

To activate it, just load it via Tools>Addins, and browse to find it. Check
the entry in the addin list, and it will then be available.

--

HTH

RP




.
 
If and when updating such file, it is necessary to delete the check-mar
before file-save as-add-in. Also, it is not necessary to use th
Microsoft Addins folder.

Chuckles12
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top