Monday, July 19, 2010

How to fix corrupt Excel 2002 workbook containing macros


Microsoft Excel is by far the remarkable spreadsheet product in the market. Excel has a rich collection of formulas which allow you to manipulate data in sophisticated ways. End users can create various macros within Excel spreadsheets which allow the automation of formatting, charting and other frequently-used spreadsheets' tasks. Moreover, you can seamlessly integrate an Excel workbook with other applications by using macros. However, at times you may encounter problems opening an Excel file with macros. For instance, when you try to open an Excel file, you will be restricted by an error message or you will see no formatting at all. Such symptoms indicate possible corruption in an Excel file. And, hence it becomes essential for you to recover data from a backup copy. If there is no clean and updated backup available, you must consider grabbing an Excel repair utility.

Consider a scenario, wherein, you open an Excel spreadsheet in 2002 for editing purpose. The spreadsheet contains many macros and are working fine. You add another set of macros and test each one successfully. You save the worksheet and when you try to reopen it, you may get the following error message:

"Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted."

You managed to get past the above error, only to find that the Excel file has lost its formatting. In addition, the macros are all disabled.

Cause

The above error and symptoms depict that the Excel file is corrupt.

Resolution

In order to isolate the above error message, you can try the following Repair excel file steps:

  • Use the Revert to Saved Document command
  • This will work if you have edited an Excel file and the file becomes corrupt before you have saved changes to the file. You can recover the corrupt file by following these steps:
1.Go to File menu, click Open, select the name of the file you are editing. You will see a dialog box saying: "Revert to saved document?"
2.Click OK and the file you are editing reverts to the last saved version
  • Save the file in SYLK format
  • Save the file in HyperText Markup Language (HTML) format

If you are unable to repair the Excel file, then you must download an Excel repair software from the Internet. Such tools efficiently repairs corrupt Excel files, irrespective of the cause behind corruption.

Sunday, July 11, 2010

Fixing 'Cannot insert Excel 4.0 macros in a restricted or password protected workbook' Excel 2007 error

Microsoft Excel application lets you organize, edit and analyze data, which can be arranged in tables. Therefore, it comes across as a very handy application to store financial data. Often Excel workbooks get corrupt. The reasons behind corruption include application malfunction, storage media corruption, virus attacks, power fluctuations, improper system shutdown and more. When you try and access a corrupt Excel file, you may receive an error message and data stored inside the Excel sheet also become inaccessible. In such situations, you must execute the Open and Repair option, which would let Excel carry out necessary rectifications and display the data. However, if corruption is severe, you may lose a great deal of information. But, the good news is that you can repair a corrupt Excel spreadsheet by opting for an Repair Excel File software.

Consider a scenario, wherein, you save an Excel 2007 file that has an Excel 4.0 macro sheet in the .xlsb format. You close and re-open the file, and set a password to protect the file. You again save the changes and close the file. Now, when you open the file again, you may receive the following error message:

'Cannot insert Excel 4.0 macros in a restricted or password protected workbook.'

After you click OK to recover the file, you may receive the same error message again and again.

After repeated attempts, you may receive the following error:

"The workbook cannot be opened or repaired by Microsoft Excel because it is corrupt."

Cause

You can receive the above error message due to the following reasons:

  • Excel 2007 has some shortcomings
  • If your Excel 2007 workbook is corrupt

Resolution

  • Try the following workarounds in order to isolate the problem:
  • The issue can be fixed by obtaining the latest hotfix for MS Office 2007
  • If the spreadsheet is corrupt, you must follow these Excel file repair steps:
1.Set the recalculation option in Excel to manual
2.Open the Excel file in Microsoft Word or WordPad
3.Open the file in Microsoft Excel Viewer
4.If a chart is linked to the corrupted file, use a macro to extract the data

However, in order to achieve best recovery results, you must grab a third-party Excel repair utility at the earliest.

Such tools employ improved scanning algorithms in order to extract data from a corrupt Excel workbook

Wednesday, July 7, 2010

How to fix Visual Basic Error 35012 while opening a workbook with macros

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.

Cause

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.

Resolution

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.