Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Leo Leo is offline
external usenet poster
 
Posts: 4
Default Excel Add-In

Hello All. I was wondering if someone can help me with an issue I am having
with add-ins. I have custom add-ins that I amusing for excel, but they are
not sitting in the add-ins folder. If I open excel direclty the add-ins are
loaded no problem, but when I use a program to fire up excel, the add-in
doesn't appear and the reference is broken. Does anyone know of a way to
have excel load the add-ins automatically when opened from another program?
It would be of trmendous help

Thanks in advance

leo


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default Excel Add-In

Leo - not sure if this is your exact case, but if you mean that you are
using something like the following (where sOpen is the pathname of your
Excel file)

Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook

Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open(Filename:=sOpen)

then you can use

xlApp.Addins("EmployeeFastLookup").Installed = True

to "register" your addin. Note that at least one source recommended testing
to see if the addins were installed and if so, removing them (i.e.,
..Installed = False) and then installing them - I'm not sure why this was
suggested.

Also note that if your addin is really a .xll file, you will need to use
something like

xlApp.RegisterXLL "c:\program files\killerApp\killerApp.xll"

instead of the .Addins code.

Hope this helps!


James Cox

"Leo" wrote in message
...
Hello All. I was wondering if someone can help me with an issue I am

having
with add-ins. I have custom add-ins that I amusing for excel, but they are
not sitting in the add-ins folder. If I open excel direclty the add-ins

are
loaded no problem, but when I use a program to fire up excel, the add-in
doesn't appear and the reference is broken. Does anyone know of a way to
have excel load the add-ins automatically when opened from another

program?
It would be of trmendous help

Thanks in advance

leo




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Excel Add-In

xlApp.Addins("EmployeeFastLookup").Installed = True

will test if the addin is checked under tools=Addins. It won't load the
addin.

Also, when excel is started through automation, addins are not loaded to
save time. You must load them overtly.


This was suggested yesterday by KeepItCool and should work:

code from KeepItCool (Oct 21, 2004)
Sub LoadXLwithAddins()
Dim xl As Object
Dim ai As Object

Set xl = CreateObject("Excel.Application")

For Each ai In Application.AddIns
If ai.Installed Then
xl.Workbooks.Open(ai.FullName).RunAutoMacros 1
End If
Next

xl.Visible = True
Set xl = Nothing
End Sub

--
Regards,
Tom Ogilvy

"James Cox" wrote in message
...
Leo - not sure if this is your exact case, but if you mean that you are
using something like the following (where sOpen is the pathname of your
Excel file)

Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook

Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open(Filename:=sOpen)

then you can use

xlApp.Addins("EmployeeFastLookup").Installed = True

to "register" your addin. Note that at least one source recommended

testing
to see if the addins were installed and if so, removing them (i.e.,
.Installed = False) and then installing them - I'm not sure why this was
suggested.

Also note that if your addin is really a .xll file, you will need to use
something like

xlApp.RegisterXLL "c:\program files\killerApp\killerApp.xll"

instead of the .Addins code.

Hope this helps!


James Cox

"Leo" wrote in message
...
Hello All. I was wondering if someone can help me with an issue I am

having
with add-ins. I have custom add-ins that I amusing for excel, but they

are
not sitting in the add-ins folder. If I open excel direclty the add-ins

are
loaded no problem, but when I use a program to fire up excel, the add-in
doesn't appear and the reference is broken. Does anyone know of a way to
have excel load the add-ins automatically when opened from another

program?
It would be of trmendous help

Thanks in advance

leo






  #4   Report Post  
Posted to microsoft.public.excel.programming
Leo Leo is offline
external usenet poster
 
Posts: 4
Default Excel Add-In

thanks a lot guys


"Tom Ogilvy" wrote in message
...
xlApp.Addins("EmployeeFastLookup").Installed = True

will test if the addin is checked under tools=Addins. It won't load the
addin.

Also, when excel is started through automation, addins are not loaded to
save time. You must load them overtly.


This was suggested yesterday by KeepItCool and should work:

code from KeepItCool (Oct 21, 2004)
Sub LoadXLwithAddins()
Dim xl As Object
Dim ai As Object

Set xl = CreateObject("Excel.Application")

For Each ai In Application.AddIns
If ai.Installed Then
xl.Workbooks.Open(ai.FullName).RunAutoMacros 1
End If
Next

xl.Visible = True
Set xl = Nothing
End Sub

--
Regards,
Tom Ogilvy

"James Cox" wrote in message
...
Leo - not sure if this is your exact case, but if you mean that you are
using something like the following (where sOpen is the pathname of your
Excel file)

Dim xlApp As Excel.Application
Dim xlBook As Excel.Workbook

Set xlApp = CreateObject("Excel.Application")
Set xlBook = xlApp.Workbooks.Open(Filename:=sOpen)

then you can use

xlApp.Addins("EmployeeFastLookup").Installed = True

to "register" your addin. Note that at least one source recommended

testing
to see if the addins were installed and if so, removing them (i.e.,
.Installed = False) and then installing them - I'm not sure why this was
suggested.

Also note that if your addin is really a .xll file, you will need to use
something like

xlApp.RegisterXLL "c:\program files\killerApp\killerApp.xll"

instead of the .Addins code.

Hope this helps!


James Cox

"Leo" wrote in message
...
Hello All. I was wondering if someone can help me with an issue I am

having
with add-ins. I have custom add-ins that I amusing for excel, but they

are
not sitting in the add-ins folder. If I open excel direclty the

add-ins
are
loaded no problem, but when I use a program to fire up excel, the

add-in
doesn't appear and the reference is broken. Does anyone know of a way

to
have excel load the add-ins automatically when opened from another

program?
It would be of trmendous help

Thanks in advance

leo








Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:07 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"