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>"
conHM.Open
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.