Hello
I have a macro which pushes out the current excel workbook that I am in to various different SharePoint sites. I would like to be able to delete the previous version of the file. I have the name of the previous file stored in a variable called 'OldFileName'. I check that the file exists by seeing if it will open and it does so that isn't the issue.
I have tried the 2 different options but everytime I get the message "Run time error 53: File not found.
.DeleteFile OldFileName
kill OldFileName
Can anyone help? if this isn't possible then can I move these files into a different folder at least?
Many Thanks
I have a macro which pushes out the current excel workbook that I am in to various different SharePoint sites. I would like to be able to delete the previous version of the file. I have the name of the previous file stored in a variable called 'OldFileName'. I check that the file exists by seeing if it will open and it does so that isn't the issue.
I have tried the 2 different options but everytime I get the message "Run time error 53: File not found.
.DeleteFile OldFileName
kill OldFileName
Can anyone help? if this isn't possible then can I move these files into a different folder at least?
Many Thanks