-
Feb 4th, 2016, 01:03 PM
#1
Thread Starter
New Member
Can't run excel macro from VBScript (WireChartEvents error)
Hi everyone,
I'm not an expert on VBA and VBScript, and I'm trying to run an Excel Macro from VBScript in a Windows 7 bloomberg computer and some how I'm not managing to do so.
When running the .vbs file it immediately pops out an error msg saying:
"Run-Time error '1004':
It's not possible to run a macro **'WireChartEvents'**. Maybe it is not avaiable in this folder or all other macros are disabled."
(Maybe the msg is a little different because I'm Brazilian and the msg is in portuguese originaly, so I freely translated it, my self)
The problem is that I have no "'WireChartEvents'" macro in the workbook I'm openning, or in any other as a matter fact (as far as I know). The problem is not in the Macro I'm trying to run because I tried to run an empty macro to make sure the problem was not my coding.
Here is my VBScript:
Dim objExcel
Dim objWorkbook
Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = False
objExcel.DisplayAlerts = False
set objWorkbook =
objExcel.Workbooks.Open("R:\LuisNicolau\masterSpreadsheetbbgbase.xlsm")
objExcel.Run "'masterSpreadsheetbbgbase.xlsm'!runBBG"
objExcel.Calculate
objExcel.DisplayAlerts = False
WScript.sleep 30000
objWorkbook.Close True
objExcel.Quit
Set objWorkbook = Nothing
Set objExcel = Nothing
Please someone help me with this, I heve tried looking for a solution in glogs but I found nothing, so any help is highly appreciated. Thanks in advance...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|