Forum Discussion
Repairing a damaged file
Hi Guys,
I have a peculiar issue with an *.xlsm file that I created in Excel 365.
The file opens fine. The data seems to be intact. My charts are working and responding to their associated slicers. My queries and connections are working as they should. I have quit a bit of VBA code in multiple modules, subs and functions, which I can access without a problem by clicking the Visual Basic icon on the Code section of the Developer tab. Macros which I assigned to many objects are working fine.
However, here is the problems:
(a) If I click on Macro icon to a assign a macro to a new object, none of my macros are showing in the Macro dialog box , except couple macros, which are assigned to my Personal. XLSB file. and,
(b) When I try to execute one specific macro, which I wrote to automate the update of my entire project (some type of dashboard), will immediately crash the workbook before executing even a single line of VBA code. It does it whether I invoke it through an object or directly through Run Macro icon (F5) on the VBA toolbar.
I tried to load-and-repair the file but it wasn't successful.
I searched through previous versions of the file I found an earlier version on which this very VBA code does work as it should and have for months and months. Unfortunately, the gap between this version and the current version is large. So I'm hoping for a solution which will not subject me for manually recreating the past 10 days or so of continuous work.
I'll appreciate any advice or suggestion you may have.
1 Reply
- JKPieterseSilver ContributorTry using VBA Code Cleaner: http://appspro.com/Utilities/CodeCleaner.htm If you are not allowed to install software, this might help too:
- Save-as your file to xlsx
- close and re-open both the xlsx and the xlsb
- In the VBA project explorer drag all modules, userforms and class modules from the xlsb to the xlsx
- Copy all code from sheet modules and ThisWorkbook module to the appropriate objects in the xlsx
- Save-as the xlsx to xlsm or xlsb
- close and reopen the newly saved file and see if it behaves itself.