I want to open an Excel file which is stored in my SharePoint under the Folder
//Documents // Design //Excel //items.xlsx
I searched through Internet and came up with the below code. The Problem with the code is it is opening the "File open " Dialogue box in the local drive.
Can anyone, suggest me a code that I could work with and could open an Excel file from SharePoint
Here is what i tried, with the previous example tried in the Forum
Sub Share()
Dim S As Workbook
Dim WB As Variant
With Application.FileDialog(msoFileDialogOpen)
.InitialFileName = "https://Sharepoint.de/Content/0030/default.aspx" & "/RootFolder=%2Fcontent%2F00008200%2FTeam%20Documents%2F02%20%2D%20Design%2F0001%20Design%2FExcel&FolderCTID=0x01200083BC38D90EC5674491B520CC48282737&View={28035ED9-59EF-42BE-BA4B-A36193C54539}&InitialTabId=Ribbon%2EDocument&VisibilityContext=WSSTabPersistence"
.AllowMultiSelect = False
.show
For Each WB In .SelectedItems
Set S = Workbooks.Open(WB)
Next
End With
If S Is Nothing Then Exit Sub
End Sub
Thanking you in advance