2

I have a Excel VBA which connects to SAP GUI, 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

Set obBAPICall = CreateObject("SAP.Functions")

I get following error :

Run-time error '-2147024770 (8007007e)':

Automation error
The specified module could not be found. enter image description here

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).

enter image description here

My SAP GUI version is :

enter image description here

Any help is highly appreciated.

Thank you.


Edit : Following code does not have any problem :

Set SAPguiApp = CreateObject("Sapgui.ScriptingCtrl.1")
Sandra Rossi
  • 11,934
  • 5
  • 22
  • 48
Sukhi
  • 13,261
  • 7
  • 36
  • 53
  • 1
    You really shouldn't need to add references since you are creating the `SAP.Functions` object using late binding. That doesn't answer you question though :( I just pulled up a very old workbook where I had used `sap.functions` as a POC and ran into all sorts of issues with version 730, although different from yours. I tried a second sheet where I used `sap.bapi.1` to interact with BAPIs in R/3 and it worked fine. I assume it's a missing library or something on the SAP install. – JNevill Jun 23 '16 at 14:04
  • Hey, thanks mate. Appreciate your help. That's why I thought too. But then I since it stopped working, I started with the troubleshooting various things one by one. Adding references is one of them. In my earlier version (I mean, with SAP GUI 7.2, I had not added any reference specifically.) – Sukhi Jun 23 '16 at 15:35

1 Answers1

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.

Sukhi
  • 13,261
  • 7
  • 36
  • 53