I am trying to export data from Sharepoint 2010 to Excel 2010. I have read-only access to the Sharepoint site. I am getting an error on the "Set objMyList = ..." line. Any idea why? I got this example from another site.

Sub ImportSharePointList()

    Dim objMyList As ListObject
    Dim objWksheet As Worksheet
    Dim strSPServer As String
    
    Const SERVER As String = "REMOVED.com/REMOVED/REMOVEDEscalations/Lists/Escalations%20to%20the%20Desk/AllItems.aspx"
    Const LISTNAME As String = "Escalation Team issues"
    Const VIEWGUID As String = "All Items"
    
    strSPServer = "https://" & SERVER & "/_vti_bin"
    
    Set objWksheet = Worksheets.Add

    Set objMyList = objWksheet.ListObjects.Add(xlSrcExternal, Array(stSPServer, LISTNAME, VIEWGUID), True, , Range("A1"))
    
    Set objMyList = Nothing
    Set objWksheet = Nothing
    
End Sub