错误“太多的单元格格式”只有一个单元格 [英] error "too many cell format" with only one cell

查看:348
本文介绍了错误“太多的单元格格式”只有一个单元格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不明白问题在哪里我知道VBA excel中经常出现的太多单元格格式,但现在我有一个简单的代码行问题:

I don't understand where is the problem. I know about the recurring "too many cell formats" in VBA excel, but now I have the problem with a simple line of code:

If color <> -1 Then
 ActiveCell.Interior.color = Cell_Color
End If 

其中活细胞只是细胞。你能解释一下为什么我有这个问题吗?如何处理它没有加载项?

Where activecell is only a cell. Can you explain me why I got this problem ? How can I handle it without add-ins ?

推荐答案

我很惊讶有一个太多的单元格格式只有一个单元格,因为我很擅长于谈论这个单元格的格式。事实上,这与选择中的格式无关。

I was quite surprised to have a "too many cell format" with only one cell because I tought excel was talking about the format of that cell. In fact this has nothing to do with the formats in the selection.

它关于一个问题,只有在excel 2003中,单元格格式保存在内存中,甚至是未使用的格式。单元格格式的数量也保存在一个变量中。这是一个整数,所以是65.000+。当由于整数限制而无法增加单元格格式的数量时,出现问题。

Its about a problem, only in excel 2003 where cells format are kept in memory, even unused ones. The number of cell format is also kept in a variable. Which is an integer and so is bounded to 65.000+. the problem appears when it is no more possible to increase the number of cell formats due to the integer limit.

出现此问题之前,大量的单元格格式可能导致宏的缓慢。请参阅第二个回答来清除未使用的单元格格式:

Before this problems appears, a high number of cells formats can cause slowness of the macros. See the second answer here to clean unused cell format:

太多不同的单元格格式

这篇关于错误“太多的单元格格式”只有一个单元格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆