0

I have written an Excel macro that automatically refreshes the data using the function, (CognosOfficeAutomationObject.RefreshAllData) that comes from TM1. If I run the macro from Excel it works as well. But if I execute the macro with a VBScript an error occurs. Can it be that VBScript always opens excel in protected mode? Do you have any experience with updating data from a database and VBScript?

VBScript

Set BuReport = CreateObject("Excel.Application")
BuReport.Application.Run "'...... .xlsm'!LogonAndRefresh_Click_Test"
BuReport.DisplayAlerts = False
BuReport.Application.Quit
Set BuReport = Nothing

Thank you!

Before Macro starts

Before Macro starts

After Macro starts

After Macro starts

4

0 回答 0