I can share some resources on how QuickBooks Desktop handles deleting or voiding a payroll check.
When you void a payroll transaction, it zeroes out the net amount and offset the taxes withheld on the check. The deductions on the voided check will no longer affect your tax liability as it removes the history of the original check.
For additional insights, you may visit this article: Void a paycheck.
May I know what specific error you're getting when trying to void the paycheck? The steps provided above should help you further in voiding/deleting paychecks accordingly.
It's possible that this is a direct deposit check reason why you aren't able to void or delete it. If so, you need to reach out to our Support Team to check the status of the deposit and make the necessary changes you need.
If it's just a regular check, then I suggest repairing your QuickBooks Desktop to perform the steps seamlessly. To run the repair tool:
After, try voiding the paychecks again.
Get back to me if there's anything you need assistance with. I'm always here to help. Have a good day!