When QuickBooks detects that another person or process is accessing the company file, it usually displays the "QuickBooks Company File in Use" error, which stops you from taking action. The first step in promptly fixing this error is to see if the file is being used by another user. Check with your teammates to see if they are working on the file or if background processes have locked it.
Try terminating any QuickBooks-related processes from the Activity Monitor (Mac) or Task Manager (Windows) if the file is not being used. To get rid of any remaining tasks that might be blocking access to the file, restart the hosting machine. Additionally, you can reset the file access status by switching to Single-User Mode and then back to Multi-User Mode.