In your code, the slash you are adding is not the same orientation as the
rest of your slashes. Perhaps that is causing problems?
"Thanks" wrote:
I am modifying existing code that opens files on the network drive to open
the same file on our sharepoint site (HTTP://www.oursharepointsite.com/My
Folder/My Other Folder/MyFile.prn).
I am using the following
Dim sFolder as string
Dim sFilesInPath as string
sFolder=ThisWorbook.path
If Right(sfolder, 1) < "\" Then
sfolder = sfolder & "\"
End If
FilesInPath = Dir(sfolder & "*.prn")
But I get a run-time error 52
sFolder is being set to HTTP://www.oursharepointsite.com/My Folder/My Other
Folder
but if I turn on the recorder and open the file I get
HTTP://www.oursharepointsite.com/My%.../My%20Other%20 Folder
Can this be fixed?
Thanks!