PDA

View Full Version : VBScript and Excel Addins



sw21
02-12-2010, 02:41 PM
Hi,
I have a few add-ins that are launched when Excel start. If I go in the VBA editor, I see all the addins in the VBAProject panel.
But here is the problem:
Im trying to launch Excel with a VBScript. The addins are ticked in Tools -> Add-Ins but in VBA I see nothing and the addins are not launch at the start of excel (I can see it since they are big it takes time to launch them!).
here is the sort of VBScript Im using:
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Very simple, but it doesnt do the same thing as when I launch Excel by myself.
Does anyone has an idea ?
Swan

ZVI
02-12-2010, 07:42 PM
Hi Swan,

Even being ticked, the VBA Add-Ins are not loaded in automation mode.
Only COM Add-Ins are loaded in this case.

You can find some details on using of VBScript for Add-Ins loading in this link:
Histogram macro / atpvbaen cannot be found (http://www.mrexcel.com/forum/showthread.php?t=396285)

Here is explanation from MS: Add-ins do not load when using the CreateObject command in Excel (http://support.microsoft.com/kb/213489/)

Regards,
Vladimir

mdmackillop
02-14-2010, 06:09 AM
If you had a loading macro in Personal, you could try something like

objExcel.Run "Personal.xls!LoadAddIns"


Sub LoadAddIns()
AddIns("Euro Currency Tools").Installed = True
AddIns("Internet Assistant VBA").Installed = True
End Sub