Typically, receiving an “access denied” error when attempting to format or repair a Mac disk is due to the disk being in use by another process. Usually, this is because one or more Windows Explorer windows are still open showing the disk or its contents. This includes still having “Computer” open in Windows Explorer.
Other causes include files on the disk still in use by applications or resident software (such as antivirus) using the disk.
To resolve this problem, try closing Windows Explorer windows and open applications. If the problem persists, try disconnecting and reconnecting the drive, or restarting the computer.