This error means, that those VLANs are still referred in some Use Profiles. Most likely some unused Profiles. This can be checked going 'Configure > Common Objects > Basic > VLANs'. There are listed User Profiles using those VLANs in column USED BY.
Then you need to remove those profiles first under 'Configure > Common Objects > Policy > User Profiles'. After removing those profiles you can remove VLANs without any issue.