While working on an Excel workbook VBA Project and all modules are removed when saved.

dgardineer

New Member
Joined
Oct 31, 2012
Messages
13
I have an associate that is working in an Excel.xlsm file. They are mostly updating data in the sheets but do have 3 modules that contain a few macros. At some point the workbook is saved. When it is saved something happens to VBA Project. When the workbook is opened again, all the macros and sheet modules are removed. The associate (who doesn't know that this has happened) makes a bunch of changes to the sheets and then tries to save again and gets errors saying it's corrupted and cannot be saved. They then send me the workbook and I open it and go into VBA project and I see all the worksheets listed and the 3 modules in the project explorer. I then click on each of the sheets expecting the sheet modules to populate for editing. What happens is nothing. I try to click on each sheet and each of the 3 existing modules and nothing is populated to the right for editing. The only fix I have been able to come up with is repairing the workbook over and over and eventually it gets fixed and is able to save. I asked them to send me a listing of their Excel Add-ins but they look ok (Name Manager Utility, a content add-in, and solver add-in). I have the last 2 and have never had this problem. The last thing I suggested to them is to run Excel in Safe mode to see if it helps with the issue until I can come up with a better solution. My better solution is to ask you all if you have ever faced this issue and what is the fix or work-around. Thanks in advance for you help
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
File is corrupt. The unfortunate best solution to solve it once and for all is to do the following:
* Copy all values (no formatting) to a new workbook
* Format all your worksheets from scratch
* Copy all your code into the newly created modules in the new workbook
* Create all your named ranges from Scratch

Alternative:
* Save as a .XLS
* Convert all your Defined Excel Tables into ranges
* Save new WB to .XLSM
* Copy all your VBA code

I recently went through many options trying to fix a corrupt WB. It's not fun having to do it again after I thought I had fixed it.
 
Upvote 0

Forum statistics

Threads
1,215,097
Messages
6,123,076
Members
449,094
Latest member
mystic19

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top