Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining if an Add-in is installed in XLSTART

Status
Not open for further replies.

kkawano

Programmer
Oct 22, 2002
17
US
Hi All,

Does anyone know how to determine if a add-in is loaded if it resides in the XLSTART directory. If you put an add-in in the XLSTART directory and then create a function that contains "For Each xlaAddin in Addins" and print out the name of each add-in, you will find that the add-ins in the XLSTART directory are not included. The only user add-ins that are in the AddIns collection are those that are referenced in Tools>AddIns> and selected in the list box.

Any ideas would be appreciated.


Thanks,

Karl
 
Hi Karl,

I have not heard of people using XLSTART folder for loading Addins. From what you say they are not being loaded as an Addin anyway. I understand their normal location is the Office\Library folder, and once they are setup in the Tools Addins area of Excel they will automatically load as Addins.

If its any use here is code I use to ensure that the Analysis Toolpack Addin is loaded:

' Set the Analysis Toolpack Add-in to be loaded, especially if
' not currently active.
If AddIns.Item("Analysis ToolPak").Installed = False Then
AddIns("Analysis Toolpak").Installed = True
End If
On Error Resume Next ' turn off error checking
Set wbMyAddin = Workbooks(AddIns("Analysis Toolpak").Name)
lastError = Err
On Error GoTo 0 ' restore error checking
If lastError <> 0 Then
' the add-in workbook isn't currently open. Manually open it.
Set wbMyAddin = Workbooks.Open(AddIns(&quot;Analysis Toolpak&quot;).FullName)
End If

I realise this is not exactly what you asked but you may find it helpful.

Good Luck,

Peter Moran
Two heads are always better than one!
 
Hi Peter,

Thanks for the reply, I actually found that if you just loop through the workbook collection it will show up there.

Thanks again for you response,

Karl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top