473,395 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

VBScript Question

Hi.

I may be posting this in the wrong section, if I am I apologise...

I am using some VBscript to open an excel spreadsheet, run a macro, save the spreadsheet and close excel.

The problem I am having is for some reason the Addins used for the functions in the spreadsheet don’t appear to be enabled. I know this as some of the functions show up as #NAME? . The account that’s running the script, the admin account and local admin account all have the addin's enabled in excel and its not a macro security problem as the macros run ok.

If I run the spreadsheet normally by just opening it in excel it all works fine. Its just when I use the VBScript it happens.


The code im using is below.

Expand|Select|Wrap|Line Numbers
  1. Dim xlObj
  2. Set xlObj = CreateObject("Excel.application")
  3. xlObj.Workbooks.Open "Path to my spreadsheet.xls"
  4. xlObj.Run "Module1.Auto_Open"
  5. xlObj.ActiveWorkbook.Saved = True
  6. xlObj.ActiveWindow.Close
  7. xlObj.Quit
  8.  
Any help appreciated.

Thanks
Tristen
Jan 10 '07 #1
3 2760
bartonc
6,596 Expert 4TB
Hi.

I may be posting this in the wrong section, if I am I apologise...

I am using some VBscript to open an excel spreadsheet, run a macro, save the spreadsheet and close excel.

The problem I am having is for some reason the Addins used for the functions in the spreadsheet don’t appear to be enabled. I know this as some of the functions show up as #NAME? . The account that’s running the script, the admin account and local admin account all have the addin's enabled in excel and its not a macro security problem as the macros run ok.

If I run the spreadsheet normally by just opening it in excel it all works fine. Its just when I use the VBScript it happens.


The code im using is below.

Expand|Select|Wrap|Line Numbers
  1. Dim xlObj
  2. Set xlObj = CreateObject("Excel.application")
  3. xlObj.Workbooks.Open "Path to my spreadsheet.xls"
  4. xlObj.Run "Module1.Auto_Open"
  5. xlObj.ActiveWorkbook.Saved = True
  6. xlObj.ActiveWindow.Close
  7. xlObj.Quit
  8.  
Any help appreciated.

Thanks
Tristen
Hi Tristen.
You may get answers here, but may have better results on the VB forum.
Jan 10 '07 #2
Hello Tristend,

I have the same problem (FactSet, Bloomberg addins, etc.). The reason is that CreateObject method starts Excel application "clean" of all addins (so you can not run any sub, function or formulas that located in these addins).
I am looking for additional method call to add everything to it from VBScript.

Did you find any answers?

Thank you.
Feb 15 '07 #3
Hi Andrekya

I am trying to develop windows application with C#.Net. With using Bloomberg API.
But i am unable to get Industry specific data from bloomberg. such as (Top Performing Industries,Worst Performing Industries ,1 Day PriceChange %,MarketCap)


Plz help me.
Jul 30 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Dave Thomas | last post by:
I have developed a web site using asp pages that use both vbscript and javascript. Run the site on my PC and everything is fine. Ftp to my web hosting provider which hosts asp pages and look on my...
3
by: Dana | last post by:
I have a form with a couple of dropdown fields. the dropdown fields get the value from one table which is a reference table. The table consists of 3 columns - type, id, name. An example would...
5
by: Leszek | last post by:
Hello gurus! I wrote a code in VBS, that will check, that current user is in one from three groups. But i don't know how asimilate it with asp.net. This page will be a bridge between 2 - main...
1
by: Ian Sedwell | last post by:
Hi guys Many thanks to all who replied to my original question. Actually, it's dead easy and the way I was doing it was correct the first time. You do indeed simply call the VBScript routine...
3
by: Mark Fox | last post by:
Hello, I am porting some old ASP 3.0 VBScript code to C#.NET and am not sure what the equivalent C# functions are for a couple VBScript functions. So my first question is: 1) Is there...
3
by: AutoShutdown | last post by:
I am using VBscript in a asp file. lets say I have a value... abc="JDD-20015-19,12" def="JDD-20015-07,8" Question (1)
4
by: sparky | last post by:
I've been working on an ASP driven website, on a client's web hosting space. One of the project requirements was the ability for the client to be able to upload files through an HTTP form. No...
0
by: thisis | last post by:
Hi All, I'm getting an error on my ASP page: Microsoft VBScript runtime error '800a000d' Type mismatch: 'StoreFileIntoField' I assume - 99.5% - the error is generated because of worng...
2
by: tunk | last post by:
I dont know where to start my question so let me tell you my story :) The ASP that cause me trouble is running on IIS that set ASP default language to JScript instead of VBScript. This ASP page...
1
by: Andrew Wan | last post by:
How can VBScript code access JScript code variables in the same ASP page? <SCRIPT LANGAUGE="VBScript"> Dim a a = 10 </SCRIPT> <SCRIPT LANGUAGE="JScript"> Response.Write(a); </SCRIPT>
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.