K
kmbarz
We have a series of spreadsheets set up in a sharepoint web folder on our
intranet. I would like to be able to use VBA to access this folder,
determine which workbook is the most recent and then open it and continue my
processing. So, I have some code posted on this forum to search a folder and
list subfolders. The question is, what would I do differently here if the
access method has to be http?
Sub Finddir(DataPath)
Dim test As Object
Dim FSO As Object
Dim fDir As Object
Dim fSubDir As Object
Dim i As Long
Set FSO = CreateObject("Scripting.FileSystemObject")
Set fDir = FSO.GetFolder(DataPath)
For Each fSubDir In fDir.SubFolders
i = i + 1
Cells(i, "A").Value = fSubDir.Name
Next fSubDir
End Sub
where Datapath is something like
DataPath = "http://intranet/sites/Data/Product Deployment/"
intranet. I would like to be able to use VBA to access this folder,
determine which workbook is the most recent and then open it and continue my
processing. So, I have some code posted on this forum to search a folder and
list subfolders. The question is, what would I do differently here if the
access method has to be http?
Sub Finddir(DataPath)
Dim test As Object
Dim FSO As Object
Dim fDir As Object
Dim fSubDir As Object
Dim i As Long
Set FSO = CreateObject("Scripting.FileSystemObject")
Set fDir = FSO.GetFolder(DataPath)
For Each fSubDir In fDir.SubFolders
i = i + 1
Cells(i, "A").Value = fSubDir.Name
Next fSubDir
End Sub
where Datapath is something like
DataPath = "http://intranet/sites/Data/Product Deployment/"