Good afternoon.
I'm trying to have an Access database automatically create an Excel spreadsheet and save it to Sharepoint when the database is first opened on any given day. The end user wants the file in Sharepoint to have the same name every day, so I can simply replace the previous file with the new version.
The problem I'm having is that Access won't overwrite the previous file with the new data. I need to delete the old file before the database can save the new version. I'd like to do this through VBA. The more I take out of the hands of my end users, the less stuff I have to fix later. I've tried using this:
Kill "<Sharepoint URL>/sites/<folder>/<subfolder>\<filename.xlsx>"
But when I run the code, I get Run-time error '53'. File not found.
Is it possible to delete an Excel file from Sharepoint using Access VBA?
Thank you.
I'm trying to have an Access database automatically create an Excel spreadsheet and save it to Sharepoint when the database is first opened on any given day. The end user wants the file in Sharepoint to have the same name every day, so I can simply replace the previous file with the new version.
The problem I'm having is that Access won't overwrite the previous file with the new data. I need to delete the old file before the database can save the new version. I'd like to do this through VBA. The more I take out of the hands of my end users, the less stuff I have to fix later. I've tried using this:
Kill "<Sharepoint URL>/sites/<folder>/<subfolder>\<filename.xlsx>"
But when I run the code, I get Run-time error '53'. File not found.
Is it possible to delete an Excel file from Sharepoint using Access VBA?
Thank you.