Skip to Content
avatar image
Former Member

SAP Logon Using Excel VBA MS Office 64-Bit (Win 10)


i'm using MS Excel 2013 and Win 7 to Logon to SAP with VBA (SAP 740 Final Release, Version 7400.

Code Below:

Sub SAPCon()
    Dim R3 As Object
    Set R3 = CreateObject("SAP.Functions")
    ZSID = "XYZ"
    Dim myFunc1, QUERY_TABLE1, RowCount1 As Object
    Set myFunc1 = R3.Add("RFC_READ_TABLE")
    If R3.Connection.Logon(0, True) <> True Then
        MsgBox "Cannot Log on to SAP"
        Exit Sub
    End If
End Sub

But when using Win 10 and MS Excel 2016 (64-Bit), I've got error:

Any different VBA Code to Logon to SAP using Win 10 and Office 2016 (64-Bit)?

Since I can't roll back the windows and MS Office installation because of IT Division policy in our company.

I can't also download activex or dll file and register it to the machine (IT Division policy) -

Thank You.

Add comment
10|10000 characters needed characters exceeded

  • Hi Iwan,

    Welcome to the SAP Community! I took the liberty of editing the tags associated with your question. I'm pretty sure "Logging of UI SAP GUI for Windows" is not what you were looking for. I'm not 100% certain, but I believe "SAP Gateway for Microsoft" is the right tag for this, as it is about connecting .NET applications (and Visual Studio, and apps like Excel) to SAP systems. I threw in the "NetWeaver" secondary tags because I'm not certain about that primary tag.


  • Get RSS Feed

2 Answers

  • Mar 02, 2018 at 10:53 PM


    Were you able to resolve this?

    If not, please try


    If R3.Connection.logon(0, False) <> True Then

    MsgBox ("Logon Failed")


    ' MsgBox ("Login OK")

    End If



    Shivraj Singh

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 28, 2018 at 07:38 AM
    Add comment
    10|10000 characters needed characters exceeded