Hello,
I have a template macro which loops through several text files each day and performs some modifications on each and then saves each as an .xlsx file. Occasionally these files are delivered blank or are just missing. I'm trying to screen out these 2 instances and successfully tested 1 option which looks at the size of the file in bytes using FileLen. My code works fine when I test on my local drive using my Temp Folder, but when I update to use a range which captures the sharepoint library url, it fails and gives a "Run time error 5; bad procedure call or argument." The url code itself (in column G) is not bad as I can run the full macro without the FileLen portion. Can anyone guide me as how to overcome this issue? If this is too little information I may be able to attach the full template here.
FileLen portion of the code is below; column G is the sharepoint library url range and column J is where the FileLen number is populated to.
Bookmarks