Excel VBA 在 Mac 上不起作用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14408478/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-11 19:15:06  来源:igfitidea点击:

Excel VBA not working on Mac

excel-vbaexcel-2008vbaexcel

提问by Matthias

I have written some code in Excel 2007 and tried to run it on a Mac with Excel 2008. The procedure is linked to a control button on the sheet, and there was a similar discussion going on here: Excel vba to mac

我在 Excel 2007 中编写了一些代码,并尝试在带有 Excel 2008 的 Mac 上运行它。该过程链接到工作表上的一个控制按钮,这里也有类似的讨论:Excel vba to mac

However, in my case this does not seem to be the exact same problem. When I open the file on Mac, Excel recognises that a macro exists (it gives the option to open the file with macros disabled). When I click the control button to run the macro, Excel DOES recognise that this is not just a picture but an actual control button (main difference to the problem in the thread I posted above) and then tells me that the associated macro called 'Main' cannot be found.

但是,就我而言,这似乎不是完全相同的问题。当我在 Mac 上打开文件时,Excel 识别出存在一个宏(它提供了在禁用宏的情况下打开文件的选项)。当我单击控制按钮运行宏时,Excel 确实认识到这不仅仅是一张图片,而是一个实际的控制按钮(与我上面发布的线程中的问题的主要区别),然后告诉我关联的宏称为“Main” ' 找不到。

Unfortunately I just read the issue with ActiveX vs. Form buttons (discussed in the thread I posted above) only now, and I do not have access to a Mac at the moment. Otherwise I would test whether that solves it; however from the thread above I understand that the problem presented itself in a different way. Any ideas?

不幸的是,我现在才读到 ActiveX 与表单按钮的问题(在我上面发布的主题中讨论过),目前我无法使用 Mac。否则我会测试是否可以解决它;但是从上面的线程中我了解到问题以不同的方式呈现出来。有任何想法吗?

回答by BigBagel

Unfortunately, Excel 2008 doesn't support VBA. The 2004 and 2011 versions do though.

不幸的是,Excel 2008 不支持 VBA。不过 2004 和 2011 版本确实如此。

http://en.wikipedia.org/wiki/Microsoft_Excel#VBA_programming

http://en.wikipedia.org/wiki/Microsoft_Excel#VBA_programming

Mac Excel 2008: Macros?

Mac Excel 2008:宏?