ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   extra excel style (https://www.excelbanter.com/excel-programming/398535-extra-excel-style.html)

Chen

extra excel style
 
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!

Bob Umlas

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!





All times are GMT +1. The time now is 01:33 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com