Excel VBA hangs when Sharepoint list is opened using ADODB RRS feed

  • Question

  • Hi,

    I have the following code for accessing the Sharepoint List in Excel VBA, but when it executes the Open statement, Excel just hangs and gets restarted without any message. 

        Dim conHM As New ADODB.Connection
        Dim rsHM As New ADODB.Recordset

        Set conHM = New ADODB.Connection

        strConnect = "Provider=Microsoft.ACE.OLEDB.12.0;WSS;IMEX=1;RetrieveIds=Yes;"

        strConnect = strConnect & "DATABASE=" & <my list url> & "LIST=" & <List GUID> 

        conHM.ConnectionString = strConnect

        sqlreadall = "Select * from <List name>"


        Set rsHM.ActiveConnection = conHM
        rsHM.CursorLocation = adUseServer
        rsHM.LockType = adLockBatchOptimistic
        rsHM.CursorType = adOpenKeyset

    The code executes till this time successfully, but it hangs in the below statement alwasys.

        rsHM.Open sqlreadall

    Please help. 

    Tuesday, February 4, 2014 3:50 AM

All replies

  • Hi   

       even i face the same issue . Can someone suggest?


    Thursday, September 4, 2014 4:05 AM