在Mac Excel 2016中不会触发WorkbookOpen事件 [英] WorkbookOpen event does not trigger in Mac Excel 2016

查看:393
本文介绍了在Mac Excel 2016中不会触发WorkbookOpen事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个Excel加载项,用于教授数千名学生蒙特卡罗模拟。

We have an Excel add-in that is used to teach thousands of students Monte Carlo simulation.

我们正在努力使其与Mac Excel 2016兼容。 我们发现App_WorkbookOpen事件似乎在Mac Excel 2016中不起作用。 在Windows Excel 2013上,当我们打开现有工作簿时会触发此事件,但在Mac Excel
2016中它不会触发。 我们似乎与App_SheetActivate事件有类似的问题, 但App_NewWorkbook事件确实按预期触发。

We are trying to make it compatible with Mac Excel 2016.  We have found that the App_WorkbookOpen event does not seem to function in Mac Excel 2016.  On Windows Excel 2013, this event triggers when we open an existing workbook, but in Mac Excel 2016 it does not.  We seem to have similar problems with the App_SheetActivate event,  but the App_NewWorkbook event does trigger as expected.

我们做错了什么? 我们依靠这些活动将功能区的按钮放在功能区上。  App_WorkbookOpen事件的代码如下所示。 请帮忙! 谢谢!

What are we doing wrong?  We rely on these events to place the button for our add-in on the ribbon.  The code for our App_WorkbookOpen event is below.  Please help!  Thanks!

      Eckstein教授

      Professor Eckstein

Private Sub App_WorkbookOpen(ByVal Wb As Workbook)
Private Sub App_WorkbookOpen(ByVal Wb As Workbook)

推荐答案

Workbook_Open的语法是 Private Sub Workbook_Open()

不是App_WorkbookOpen

The syntax for Workbook_Open is Private Sub Workbook_Open()
Not App_WorkbookOpen

没有参数应该存在,代码应该在ThisWorkbook中。

No arguments should be present and the code should be in ThisWorkbook.


这篇关于在Mac Excel 2016中不会触发WorkbookOpen事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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