Hi,
I'm trying to get a web folders contents so I can download any images that match a partial filename in my workbook (I'm not sure it's even possible in VBA).
This is my code so far but it falls over at strPath with "path not found":
Sub getWebFolderContents(strPath)
Dim objFSO, objFldr
Dim objFl
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFldr = objFSO.GetFolder(strPath)
For Each objFl In objFldr.Files
Debug.Print objFl.Name
Next
Set objFSO = Nothing
Set objFldr = Nothing
End Sub
Any advice or pointers would be much appreciated.
Thanks,
K
I'm trying to get a web folders contents so I can download any images that match a partial filename in my workbook (I'm not sure it's even possible in VBA).
This is my code so far but it falls over at strPath with "path not found":
Sub getWebFolderContents(strPath)
Dim objFSO, objFldr
Dim objFl
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFldr = objFSO.GetFolder(strPath)
For Each objFl In objFldr.Files
Debug.Print objFl.Name
Next
Set objFSO = Nothing
Set objFldr = Nothing
End Sub
Any advice or pointers would be much appreciated.
Thanks,
K