安装了Excel 2010的计算机上的列表框列表属性错误 [英] Listbox list property error on machines that have Excel 2010 installed

查看:89
本文介绍了安装了Excel 2010的计算机上的列表框列表属性错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在Excel和VBA开发了一个长期应用程序,其中包含一个包含大量控件的用户表单,包括列表框。 列表框的内容通常使用.List属性设置。

We have a long standing application developed in Excel and VBA which has a user form with a large number of controls, including list boxes.  The contents of the list boxes are generally set using the .List property.

最近,在安装了Office 2010的计算机上,我们看到以下错误: "运行时错误'-2147467259(80004005)'无法设置List属性。未指定的错误。"这似乎只出现在少数几个列表框中,但即使我们替换看似受影响的Excel,也会出现
继续显示"未指定的错误"。消息(不链接到调试)。

Recently, on machines which had had Office 2010 installed, we're seeing the following error: "Run-time error '-2147467259 (80004005)' Could not set the List property. Unspecified error." This only seems to occur on a handful of list boxes, but even if we replace the ones which appear to be affected Excel continues to display an "Unspecified Error" message (which doesn't link to debug).

我们在同一台计算机上使用旧版本的Office时会看到相同的行为。 由于它看起来与COM有关,我们调查了fm20.dll并发现如果我们用另一台没有安装Office 2010
的机器的旧版本替换fm20.dll,一切都会重新开始正常工作。

We see the same behaviour whilst using older versions of Office on the same machine.  As it looks COM related we investigated the fm20.dll and found that if we replace the fm20.dll with an older version from another machine that hasn't had Office 2010 installed everything starts to work correctly again.

有没有人遇到过这种行为,或者知道问题的解决方案?

Has anyone come across this behaviour, or know of a solution to the problem?

谢谢,

Jamie

推荐答案

嗨Jamie,

Hi Jamie,

感谢您发帖,我们很乐意为您提供帮助。

Thank you for posting and we are glad to help with you.

>>列表框的内容通常使用.List属性设置。

>>The contents of the list boxes are generally set using the .List property.

您是否尝试过这样设置.List属性:

Have you tried to set .List property like this:

Private Sub CommandButton1_Click()

Dim arrData(2)As String

arrData(0)="一个< b $ b arrData(1)=" Two" b
arrData(2)=" Two" br />
ListBox1.List = arrData

End Sub

Private Sub CommandButton1_Click()
Dim arrData(2) As String
arrData(0) = "One"
arrData(1) = "Two"
arrData(2) = "Two"
ListBox1.List = arrData
End Sub

它在我的电脑上运行良好。很遗憾,我无法重现您的问题。

It works well on my computer. Unfortunately, I can't reproduce your issue.

>>由于它看起来与COM有关,我们调查了fm20.dll并发现如果我们用另一台没有安装Office 2010的机器上的旧版本替换fm20.dll,一切都会再次开始正常工作。

>> As it looks COM related we investigated the fm20.dll and found that if we replace the fm20.dll with an older version from another machine that hasn't had Office 2010 installed everything starts to work correctly again.

应该是fm20.dll的问题。我认为fm20.dll可能在您的计算机上损坏,请查看本文有关可能的原因: http://pcsupport.about.com/od/findbyerrormessage/a/fm20-dll-not-found-missing-error.htm
您可以尝试根据文章修复它。

It should be the issue of fm20.dll. I think fm20.dll may corrupt on your computer, please take a look at this article about possible reasons:http://pcsupport.about.com/od/findbyerrormessage/a/fm20-dll-not-found-missing-error.htm. You can try to fix it according to the article.

我希望它可以帮助您并随时跟进。

I hope it can help you and feel free to follow up.

最诚挚的问候,

 


这篇关于安装了Excel 2010的计算机上的列表框列表属性错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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