Quantcast
Channel: VBForums - ASP, VB Script
Viewing all articles
Browse latest Browse all 687

Excel Add-In Script is not working through Active Setup

$
0
0
Dear All,

I've wrote the following code to add the XL Add-in.
================================================================
path = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
sADDIN = path & "\Testing.xla"
set oXL = CreateObject("Excel.Application")
oXL.Workbooks.Add
set oAddin = oXL.Addins.Add(sADDIN, True)
oAddin.Installed = True
Set oAddin = Nothing
oXL.Quit
Set oXL = Nothing
================================================================

The above code is working fine for me.

But when executed through Active Setup (for the sake of other users) it didn't work.
It pops the following error :

Script : C:\PathoftheFile\AddInAdd.Vbs
Line : 5
Char : 1
Error : Unable to get the Add Property of the AddIns Class
Code : 800A03EC
Source: Microsoft Excel

Note : The Same Code works fine when executed normally. but the problem is while executing through Active Setup.

Could any one please help me ?

Thanks & Regards,
Yogi

Viewing all articles
Browse latest Browse all 687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>