As VBA file depend upon source code, any deletion in source code can corrupt VBA file. Most common error for VBA file is “VBA project is damaged”. This problem comes up only if you try to convert an Access 97 database to Access 2002. Main cause of corruption is that Access 97 is not in a fully compiled state. If errors indicate corruption due to a Visual Basic Application (VBA) or macro, you may recover the affected tables, queries and macros by exporting them from the corrupted database and into a new database
Compact and repair has some limitation. Some objects must be recovered from backup. Second method is open your database in Access 97, and issue a Compile and Save All Modules from the Debug menu in VBE before attempting to run the conversion process again..