79130819

Date: 2024-10-27 14:56:52
Score: 5
Natty:
Report link

I’ve run into the same error and here’s what I think the problem is:

If you were to manually attempt to delete a file such as C:\test.txt, you’d get the following error message:


File Access Denied

You’ll need to provide administrator permission to delete this file


So when excel VBA tries to delete a file in the root directory, I think it also gets an error message.

For me, at least, that seems to be the cause of the problem.

If anyone out there knows how to programmatically give VBA permission to delete a file in the root directory, I’d be grateful.

Hopefully, this post will help to get us all on the right track.

Regards,

Kellog

Reasons:
  • Blacklisted phrase (1): Regards
  • RegEx Blacklisted phrase (2): be grateful
  • Contains signature (1):
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Kellog