Let's start with the obvious. Did you just open the file and not close it? If the file is closed, but the program is still running, close it too, then try again.
2. Reboot your computer
While rebooting is inconvenient, it requires zero skills or fiddling with stuff like the Task Manager or third party tools. Rebooting also clears your RAM and possibly fixes other nuisances in one go. So try this if you can't be bothered to look into the cause.
3. End the Application via the Task Manager
The reason rebooting helps is because the system will start from scratch and---among other things---all processes currently running in the Task Manager will be closed. Instead of rebooting, you can also try to manually end the process or application that holds your file hostage. This is the most successful method to fix the "file is open in another program" error.
Click Ctrl + Shift + ESC to open the Task Manager. Alternatively, you can right-click the Taskbar or click Ctrl + Alt + Del anywhere in Windows and select Task Manager. If you see the compact Windows 1o version, click More details and make sure you're in the Processes tab. Now browse for the application that you used to open the "file in use". For example, if you were viewing a document, look for Word.
Once you find the process, select it and click End task in the bottom right. This will close all instances of the program. If you cannot seem to find the process, have you tried rebooting, yet?
4. Change File Explorer Process Settings
By default, File Explorer launches all its windows in a single process (explorer.exe). It could be, however, that your settings force File Explorer to launch separate processes, which could cause a conflict between different processes.
Press Windows + E to open File Explorer. Go to View > Options > Change folder and search options.
In the Folder Options window, switch to the View tab and find the Launch folder windows in a separate process option. Make sure it's not checked. Click Apply to save any changes.
If the option was unchecked in the first place, you could try if checking it solves your issue.
5. Disable the File Explorer Preview Pane
Previews in the File Explorer can cause conflicts like the "file is open in another program" error.
Press Windows + E, switch to the View tab, and press Alt + P to close the preview pane. The screenshot below shows an open preview pane on the right.
After closing the preview pane, try the operation again and see whether the "file in use" error has disappeared.
6. Force Delete the File in Use via the Command Prompt
You can bypass the File Explorer and force delete the file using the command prompt.
First, we need to track down the file path directory in File Explorer. Press Windows + E to open file explorer, locate the affected file, and copy the file path.
Now press Windows + S, search for Command Prompt, right-click the respective result, and select Run as administrator. To navigate to the file directory of your file in use, enter cd [directory path you copied] and hit Enter.
Before we can proceed and force delete the file in use, we have to temporarily kill the File Explorer process. This will cause your Taskbar, wallpaper, and open folders to disappear. But don't worry, you can restart File Explorer and we'll show you how below.
To close File Explorer, press Ctrl + Shift + ESC, find Windows Explorer, right-click the process, and select End task.
Return to the Command Prompt. If you lost the window, press Alt + Tab to jump to it.
Enter this command to delete the file, replacing everything between the quotes with your actual file name:
del "File in Use.doc"
To restart the File Manager, open the Task Manager (Ctrl + Shift + ESC), click File > Run new task, enter explorer.exe, and click OK. This should restore your desktop to its usual appearance.