tutashadow.blogg.se

Onedrive will not open
Onedrive will not open













onedrive will not open

Public Sub GetAllFilesFolders(rng As Range, ObjSubFolder As Object, strSharepointAddress As String) GetAllFilesFolders rng, objFolder, "" & strSharepointAddress Set rng = ThisWorkbook.Worksheets(1).Range("a1")

onedrive will not open

ObjNet.MapNetworkDrive "A:", SharepointAddress Set FS = CreateObject("Scripting.FileSystemObject") Set objNet = CreateObject("WScript.Network") Note You must change this line of code to fit the url of your company: `SharepointAddress = ""` It might need a little bit of tweaking but it lists all the files in the specified sharepoint folder my local path might be different than their local path). Please note that I do not want to use a local C: path since the idea is that the users will put files in the shared folder and will run the macro on their end (i.e. What I was hoping is that the VBA would scan that specific folder and open each file so I just removed the file name and used the same URL and used the following code: Set oFSO = CreateObject("Scripting.FileSystemObject") The problem is that for this to work the program must know exactly the file name. In Excel I recorded a macro to open a file on OneDrive for Business and the code it generated was something below which works fine: Workbooks.Open Filename:= ""















Onedrive will not open