Does anyone know of a way to delete corrupt Excel styles?
I have a large workbook (about 60 sheets) that had almost 7,000 names, more than half of which had #REF errors. I used Jan Karl Peterse’s Name Manager to get rid of them (including about 80 that needed to be renamed one at a time). I then deleted all the unused custom number formats (about 150). However, when I tried deleting the styles, the macro I used failed. I found a total of almost 1,400 styles, and the macro checks which are in use and deletes the others. It managed to delete almost 300 before it failed. I then tried using the ASAP Utility macro but it too failed. I have another macro that will delete all styles not defined as NORMAL, but that is brute force, and although it doesn’t fail it doesn’t delete one particular corrupt style.
The style in question is =’C’:WINNT35SYSTEM32COMMAND.COM, which is how it shows up in the Style dialog, and how it shows up in the variables, but there doesn’t seem to be any way to delete it.
I also tried saving the file in XML format and opening it Notepad to see if I could find the style that way, but that didn’t work either.
Then it occurred to me that I should ask here. If there’s a solution to be had, this is the place that will have it.
Thanks for any input…