CopyPastehas never been so tasty!

How to fix Visual Basic Error 35012 while opening

by anonymous

  • 1
  • 0
  • 0

Visual Basic Application is a programming language which can be used to build user-defined functions (UDF), automate processes, and other low level functionality through DLLs (dynamic link library).  In Excel it can be used to develop macros and complex programs. At times, an Excel workbook with macros or VBA modules can become damaged in many scenarios including improper exit from application, abrupt system shutdown, application malfunction and more. In such events, you may receive an error message when you attempt to open a damaged workbook. Since, you cannot access valuable data stored in the Excel file, it becomes very important for you to look for a possible backup copy. However, if you don't have a clean and updated backup, you must consider employing various effective Excel repair strategies.

Consider a scenario, wherein, you have an Excel workbook related to employees' salary details with Microsoft Visual Basic for Application modules. When you try to open the same, you may receive the following error:

"Unexpected Error (35012)"

You may also see a dialog box with 'Disable Macros option. Even if you disable the macros included in the workbook, you might not be able to open the file. And, if you click OK in the error message, the application will close the workbook but leaves the program open.


The unexpected error message is a sign of corrupt workbook. You can receive the above error message, irrespective of the presence of macros in the Excel file. It is due to corruption that you are not able to open the file and access its content. In order to overcome corruption issues, you would be required to take appropriate Repair Excel File steps as discussed in the later part of the article.


You can observe various steps to recover data from corrupt or damaged Excel workbooks. In case you are not able to open an Excel file, try the following workarounds:

  • Set the recalculation option in Excel to manual
  • Attempt to open the file in MS word or Word Pad
  • Open the file in Microsoft Excel Viewer
  • In order to ensure data integrity for new and other workbooks, you can use the option to create a backup. Consider these steps for the same: In the Save As, click Options, and then click Always create backup feature.

If you are still not able to extract data or repair a corrupt workbook, download a third-party Excel repair application from the Internet. Such tools employ improved scanning algorithms and recover data from corrupt workbooks efficiently.

Add A Comment: