Hello I'm trying to port an Excel document with VBA macros, which I had developed for our network drives, to teams/sharepoint. I am automatically creating folders based on the data that is entered. Unfortunately I now get the error message Runtime error '52': wrong file name or number. Here is the code I use to check if a folder already exists.
Function CheckIfFolderExists(ByVal folderToCheck As String) As String
CheckIfFolderExists = Dir(folderToCheck, vbDirectory)
Here also the value that is in folderToCheck: "\\xxx.sharepoint.com\sites\xxx\Shared Documents\xxx\xxx\001_01_de_SR_Test" Why do I get this error? Do I perhaps make an error with the slash characters?