简单的VB代码突然停止工作。 [英] Simple VB code stops working suddenly.
问题描述
我已经为一个工程项目工作了一段非常基本的电子表格。我用VB填充了几个图表的标题。我最近添加了一个新图表,并重复了代码,但突然之间代码停止运行,下面列出了
错误消息。
突然工作的图表中的代码停止工作以及新图表。任何想法,线索?
"运行时错误'2147467259(80004005)
对象'_Chart'的方法'Hastitle'失败
代码为
使用ActiveChart为
.HasTitle = True
。 ChartTitle.Text =" ='Insitu culv'!TitleStruct"
以
结尾
我可能偶然发现了原因,虽然我不明白原因和结果。
我不小心保护了新图表。
删除该表单的保护后,其余表单也开始正常工作。
?? ??
I have been working with a pretty basic spreadsheet for some time for an engineering project. I have used VB to populate the title of several charts. I recently added a new chart and did repeated the code, but all of a sudden the code stopped running with error message listed below.
The code in charts that were working suddenly stopped working as well as the new chart. Any ideas, clues?
"Run-time error '2147467259 (80004005)
Method 'Hastitle' of object '_Chart' failed
The code was
With ActiveChart.HasTitle = True
.ChartTitle.Text = "='Insitu culv'!TitleStruct"
End With
I may have stumbled on the reason, although I don't understand the cause and effect.
I had accidentally protected the new graph sheet.
After I removed the protection of that sheet, the rest of the sheets started working properly as well.
????
这篇关于简单的VB代码突然停止工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!