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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,224,552
Messages
6,179,484
Members
452,917
Latest member
MrsMSalt

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