TechTutorials - Free Computer Tutorials  

Cannot Compile Excel VBA Project 

Added: 08/18/2009, Hits: 5,959, Rating: 0, Comments: 0, Votes: 0
Add To Favorites | Comment on this article
Microsoft Excel allows you to extend its functionality beyond its defaults by the use of programming language Microsoft Visual Basic. The VBA code in this environment is written, changed, compiled and viewed in VBA editor. The VBA editor organizes and shows all the VBA modules in what you refer as VBA projects. Actually, each time when you create a new workbook, a VBA project gets automatically created and attached with it. At times, you find difficulties while compiling a VBA project associated with a workbook. The odds are that the workbook is corrupted. Thus, to restore the corrupted workbook, you will need to use your current backup. Alternatively, you can also opt for scanning the damaged workbook by using Excel Recovery application.

For an instance, after you edit an existing VBA project, when you try to compile it, you get the similar error signature:

“AppName: excel.exe AppVer: ModName: vbe6.dll
ModVer: Offset: 00083676”

This behavior occurs irrespective of changes made to the project.


There can be several causes that might prevent a VBA project to be compiled. Some of them are listed below:

  • Bugs in code

  • Code size limitation issues

  • Use of default names for macros

  • One or more modules are corrupted

  • Current workbook is corrupted

  • Solution

    You need to try following suggestions to solve the issue described above:

  • Try running the code without compiling. This will help you to detect the code bugs, if any.

  • You should try deleting one or more functions.

  • If the error root from naming conventions issues for modules, you need to copy the code into modules and name them differently.

  • Try creating a new VBA project and copy the modules and functions one at a time. This will help you to detect the corrupted modules. Delete them, if any.

  • You should attempt to import the code to a new workbook to compile it. If it gets compiled and run successfully, the current workbook is corrupted. Use backup to restore the file.

  • If you lose data while no clean backup is available, scan the damaged workbook by using Excel Repair tool. An excel file repair software can repair the damaged workbook by using powerful algorithms while providing graphically rich user interface.

    Stellar Phoenix Excel Recovery is a comprehensive tool to repair damaged Microsoft Excel files. It supports excel repair for Excel 2007, 2003, 2002, and 2000. It can restore all file objects, such as hyperlinks, formulas, charts, pivot tables, macros etc. This non-destructive software is compatible with Windows Vista, XP, 2003, 2000, and NT.

    Comments (0)

    Be the first to comment on this article

    Related Items

    7 Seconds Resources, Inc.

    IT Showcase