使用功能区处理Excel文件时,Empy Critical消息框 [英] Empy Critical message box while processing Excel files with ribbons

查看:104
本文介绍了使用功能区处理Excel文件时,Empy Critical消息框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用VBA处理集成了色带的各种excel文件。功能区包括onload,checkbox,enable,visible和labels的回调。我在流程结束时收到空的crictical消息框,但仅在流程结束时
从模板创建这些文件。 更新或从文件中提取数据的所有其他进程无问题。

I'm using VBA to process hundeds of excel files with ribbons integrated. The ribbons include callbacks for onload, checkbox, enable, visible, and labels. I am getting empty crictical message boxes at the end of the process, but only at the end of the process that creates these files from a template.  All other processes that update or extract data from the files work w/o issue.

执行处理的工作簿上还有一个带有10个复选框的功能区。 在我为此工作簿创建的excel文件添加了一个功能区之前,我没有收到任何错误。 但是,空白关键消息框的数量与复选框的数量相匹配,
并且在msgbox全部关闭后,不再检查复选框。

The workbook doing the processing also has a ribbon with 10 checkboxes on it.  I got no errors until I added a ribbon to the excel files this workbook is creating.  However, the number of blank critical message boxes matches the number of checkboxes, and after the msgboxes all close, the checkboxes are no longer checked.

我认为这表示功能区回调不是线程安全的,但我没有找到确认的信息。任何人都可以确认功能区回调不是线程安全的吗?

I think this indicates the ribbon callbacks are not thread safe, but I have not found information to confirm that. Can anyone confirm ribbon calbacks are not thread safe?

因为其他进程可以处理这些文件没有问题,所以一个进程必须做一些不同的事情来触发这种行为。如果我知道那是什么,我可以围绕限制进行编码。在此过程中,我打开模板,为正在生成的工作簿添加自定义数据
和工作表,保存,删除自定义工作表,然后继续下一个工作簿以生成不关闭模板。 任何人都可以给我一些关于可能触发这种行为的动机吗?

Because other processes work on these files w/o an issue, the one process must be doing something different that triggers this behavior. If I knew what that was I could code around the limitation. In this process I open the template, add custom data and sheets for the workbook being generated, saveas, remove custom sheets, and continue to the next workbook to generate w/o closing the template.  Can anyone give me some inisights into what might be triggering this behavior?

Jeff Abbott系统架构师CAE专业服务2603 Discovery Drive奥兰多,佛罗里达州32826 jeff.abbott @ caemilusa.com工作:407-745-2605单元格:407-222-7909"通过保护它们,我们通常可以通过连接想法来获得更好的服务。" -Steven
Johnson,好主意来自:创新的自然历史

Jeff Abbott Systems Architect CAE Professional Services 2603 Discovery Drive Orlando, FL 32826 jeff.abbott@caemilusa.com Work: 407-745-2605 Cell: 407-222-7909 "We are often better served by connecting ideas than we are by protecting them." -Steven Johnson, Where Good Ideas Come From: The Natural History of Innovation

推荐答案

我刚刚验证了错误只发生在Excel中应用程序不是最顶层的窗口。
I just verified the errors only occur if the Excel application does not remain the topmost window.


这篇关于使用功能区处理Excel文件时,Empy Critical消息框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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