Share via

Excel VBA runtime error 70

Mark Schears 1 Reputation point
2022-01-09T22:20:42.703+00:00

I am running Windows 10 64 bit and Excel 2010. My OS is on a SSD, and all of my data files are on another drive(Non-SSD) in my PC. I can manually copy directories from the C drive to the D drive with my mouse without any restrictions. I want to create a function to move directories from the D drive to the C drive, but when I program this in VBA, I get run time error 70.
I have utilized FileSystemObject to select each drive as an object and call the .Move method.

Any suggestions as to how to resolve this?

Thank you.

Developer technologies | Visual Basic for Applications
0 comments No comments

1 answer

Sort by: Most helpful
  1. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2022-01-10T03:10:46.233+00:00

    Error 70 = Permission denied.
    Would that help you resolve it?

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.