ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to create a "xla" add-ins and active it. (https://www.excelbanter.com/excel-programming/313037-how-create-xla-add-ins-active.html)

JohnDing

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
'--------------------------------


Bob Phillips[_6_]

How to create a "xla" add-ins and active it.
 
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 ToolsAddins, and browse to find it. Check
the entry in the addin list, and it will then be available.

--

HTH

RP

"JohnDing" wrote in message
...
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
'--------------------------------




DingJohn

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

to find it. Check
the entry in the addin list, and it will then be

available.

--

HTH

RP

"JohnDing" wrote in

message
...
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
'--------------------------------



.


Chuckles123[_33_]

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

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

--
Chuckles12
-----------------------------------------------------------------------
Chuckles123's Profile: http://www.excelforum.com/member.php...fo&userid=1494
View this thread: http://www.excelforum.com/showthread.php?threadid=26784



All times are GMT +1. The time now is 01:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com