简体   繁体   中英

Excel VBA with SAP GUI 7.40 - SAP.Functions not working

I have a Excel VBA which connects to SAP, pulls some data and does some processing on it. It was working fine with SAP GUI 7.20 But it stopped working when I installed SAP GUI 7.40 .

My code is as below :

Dim obBAPICall As Object

'   *   Create object
Set obBAPICall = CreateObject("SAP.Functions")
.
.

I get following error :

在此处输入图片说明

I've already gone through some weblinks and I believe I've all the required references. (In fact, I've added many more in order to troubleshoot the problem).

在此处输入图片说明

My SAP GUI version is :

在此处输入图片说明

Any help is highly appreciated.

Thank you.


Edit : Following code does not have any problem :

Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")

Got it ! The problem was with the latest MS office product (and not with SAP GUI 7.40). The IT guys had rolled out some updates in MS Office and it was creating a problem. I restored MS Office and it is working fine now.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM