View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Umlas Bob Umlas is offline
external usenet poster
 
Posts: 301
Default extra excel style

You can help find the culprit by putting in a Watch variable in your code
which will break when ThisWorkbook.Styles.Count changes.
When you copy a sheet from a workbook you're copying in all the styles as
well.
Just a thought
Bob Umlas

"Chen" wrote in message
...
hi,

I have a workbook using a few styles. But a lot of extra unused styles get
into the workbook. There was 3096 yesterday and causing the "too many
different formats" error. So I wrote a macro to delete all these styles
that
are not used, and down to 46 styles, which is acceptable. Today, the user
reported to me, again, we have 3085 styles in the workbook. It seems excel
will automatically copy styles from other workbook or something. This
workbook is uses two external csv files as input, and another xls file
reads
from it. I checked all three but they don't have many styles.

Please help!