Corrupt styles in 2010: How to remove?

thedr9wningman

New Member
Joined
Feb 27, 2007
Messages
13
Hi,

I found this post in the <a href="http://www.excelforum.com/excel-general/494340-removing-corrupt-styles-in-an-excel-workbook.html">Excel Forums</a> and I had the same problem. It was never answered.
<code>
Hello,

How can I remove corrupt styles from an Excel 2000 workbook ?

I've tried deleteing through the menus - but that doesn't work, and I've
tried through VBA, but that fails with an error for the styles that are
corrupt. (Delete method of style class failed)
e.g.

for i=1 to activeworkbook.styles.count:debug.print
activeworkbook.styles.item(i).name:activeworkbook.styles.item(i).delete:next
i

Inspecting the names of the styles that are failing to delete displays a
couple of non-printable characters show as squares, or Yen symbols.

Any idea how to obliterate these styles?
</code>

I've written similar scripts to no avail.
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,214,827
Messages
6,121,812
Members
449,048
Latest member
greyangel23

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