fb7894
04-08-2014, 08:35 AM
Hello,
I have the following code which imports a Sharepoint list into Excel. Problem is, it won't work on MY machine. It works perfectly for everyone else on my team. I get the error "You do not have adequate permissions to modify this list. Changes to your data cannot be saved."
I don't understand. I'm not trying to modify the list. When I go into Sharepoint manually, i have full control over this list. Any suggestions?
Sub ExtractSharepointList()
Const strViewGUID = "{E17A891F-5CD2-4F2D-A567-9571CA0D578B}"
Const strServerName = "https://collaboration.xxxxxx.net/sites/ImpReady/_vti_bin"
Const strListName = "{D6427EAA-62B8-4FD9-9F28-4D72292D5D91}"
Dim lst As ListObjects
Dim lstobj As ListObject
Dim wsheet As Worksheet
Set wsheet = ActiveWorkbook.Worksheets.Add
Set lst = wsheet.ListObjects
Set lstobj = lst.Add(SourceType:=xlSrcExternal, Source:=Array(strServerName, strListName, strViewGUID), LinkSource:=False, _
TableStyleName:=xlGuess, Destination:=Range("A1"))
End Sub
I have the following code which imports a Sharepoint list into Excel. Problem is, it won't work on MY machine. It works perfectly for everyone else on my team. I get the error "You do not have adequate permissions to modify this list. Changes to your data cannot be saved."
I don't understand. I'm not trying to modify the list. When I go into Sharepoint manually, i have full control over this list. Any suggestions?
Sub ExtractSharepointList()
Const strViewGUID = "{E17A891F-5CD2-4F2D-A567-9571CA0D578B}"
Const strServerName = "https://collaboration.xxxxxx.net/sites/ImpReady/_vti_bin"
Const strListName = "{D6427EAA-62B8-4FD9-9F28-4D72292D5D91}"
Dim lst As ListObjects
Dim lstobj As ListObject
Dim wsheet As Worksheet
Set wsheet = ActiveWorkbook.Worksheets.Add
Set lst = wsheet.ListObjects
Set lstobj = lst.Add(SourceType:=xlSrcExternal, Source:=Array(strServerName, strListName, strViewGUID), LinkSource:=False, _
TableStyleName:=xlGuess, Destination:=Range("A1"))
End Sub