How to create a "xla" add-ins and active it.
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
'--------------------------------
|