I haven’t had any problems using the Mac version of Excel 2016. I don’t create many macros myself, but I do regularly open files (created by others) with macros, and they all work fine. Microsoft has published a comparison of the features available in Office 2016 for Mac with Office 2013 for Windows.
See solution in other versions of Excel:. You can access the VBA environment in Excel 2011 for Mac by opening the Visual Basic editor. First, be sure that the Developer tab is visible in the toolbar in Excel. The Developer tab is the toolbar that has the buttons to open the VBA editor and create Form Controls like buttons, checkboxes, etc. To display the Developer tab, click on Preferences under the Excel menu at the top of the screen. When the Excel Preferences window appears, click on the Ribbon icon in the Sharing and Privacy section.
In the Customize section, check Developer in the list of tabs to show. Then click on the OK button. Select the Developer tab from the toolbar at the top of the screen. Then click on the Editor option in the Visual Basic group. Now the Microsoft Visual Basic editor should appear and you can view your VBA code.
We have an Excel add-in that is used to teach thousands of students Monte Carlo simulation. We are trying to make it compatible with Mac Excel 2016.
We have found that the AppWorkbookOpen 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 AppSheetActivate event, but the AppNewWorkbook event does trigger as expected. 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 AppWorkbookOpen event is below. Professor Eckstein. Hi Jona, What do you mean with your Excel add in in Mac Excel 2016? What are you developing? Based on my understanding, Excel VSTO add-in is not supported in Mac.
Do you develop with VBA in your mac? It would be helpful if you could share us more information about your project like detail steps to create such project. Best Regards, Edward We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. Click to participate the survey. We do most of the development in Windows, but managed to make the add-in mostly compatible with Mac Excel 2011 a few years ago (except for one charting feature that seemed irretrievably broken on the Mac).
Excel 2016 for Mac is proving more challenging. We do not use VSTO. We all the development using VBA and the Visual Basic editor in Excel. This a key simplicity element for our add-in.
It is 100% VBA, so everything is in one file and we don't need to maintain an installer (we tried for a while but do not have the resources). All of our development is in VBA, mostly in Windows, but also on the Mac (although the tools are worse and 2016 is much worse than 2011).
Our goal is to have one VBA add-in which works with both platforms. There have been some glitches, but this strategy worked until this latest Mac release of Excel came out. It also seems that VBA is incredibly slow in Mac Excel 2016. Our run times are over an order of magnitude longer in 2016 than they used to be. However, the event compatibility issues are more important. Hi Jona, Thanks for your details information.
This forum is used to discuss about Excel developing issue on windows, your issue is related with Excel VBA in mac which is not supported here. I suggest your post your issue in the forum below: Thanks for your understanding. Best Regards, Edward We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click to participate the survey. Below is the code from a version that has worked for years in Windows. If we do are something wrong, I would very much appreciate knowing what it is. Much of this code was developed by independent study students at my University, and sometimes shortcuts and mistakes accumulate. I have a lot of programming experience, but not with the intricacies of VBA (I work a lot with C and MPI on parallel machines).
Thanks, Prof. Eckstein Private Sub AppWorkbookOpen(ByVal wb As Workbook) Dim x As New EventClassModule Set x.App = Application Application.EnableEvents = True Call YasaiNewWorkbookWindow If Application.Version = 8# And Workbooks.count 1 Then MsgBox ('YASAI cannot update the workbook links in Excel97 when more than one workbook is open.
If your formulas do not work, you may need to close all workbooks and reopen this one. Once you have done this and saved this workbook, the links will be fixed and you can open additional workbooks.' ) Exit Sub End If ChangeYasaiLinks wb, ThisWorkbook.FullName End Sub. That's similar to the snippet in your OP, as I mentioned it would not have worked in any version including Excel 97, at least not as posted (ie to trap app-level events such as when other workbooks open). There are several reasons but difficult to correct without knowing what it's all supposed to do. However simply to trap app-level events try this In a new workbook add a new Class module and name it clsAppEvents, and an ordinary module. Setting 'Application.EnableEvents = True' within the code that was supposed to trap an event always puzzled me, but I assumed that the student who wrote it had some reason.
We have some code in the ThisWorkbook module, but it is not identical to what you recommend. I'll instruct the current students working on the project to read the chapter on event trapping in their reference book, and try to re-work the entire event-trapping portion of the code. What the code tries to do is the following: in Excel 2013 and later, the ribbon has a separate existence for each workbook. We want to add a button to the ribbon to activate our simulation add-in. Before 2013, this could be done once upon load of the add-in, but now it has to be done each time you open the workbook.
Another approach would be ribbon XML, but for us that is overkill. Also we are trying to keep the add-in really simple,with just one.xla file that you can load up without and installer or other complications.
That's why we just want to put a button on the ribbon through VBA. Option Explicit Dim x As New EventClassModule Private Sub WorkbookAddinInstall Set x.App = Application modYASAI.AddYasaiMenuItem End Sub Private Sub WorkbookAddinUninstall modYASAI.RemoveYasaiMenuItem End Sub Private Sub WorkbookOpen Set x.App = Application End Sub. Essentially the same setup (to trap app-level events) can be written in various ways. Although the approach is different to what I suggested, at a glance your code above should work this time, assuming App is declared 'WithEvents' in the class module. Since 2007 adding buttons in the Ribbon vs Commandbars (toolbars) is indeed very than significantly different. It involves adding XML (as you say), beyond the scope of this thread but there are plenty of resources out there.
As far as 2013 is concerned indeed there are differences with the change from MDI to SDI, though not so much concerning the Ribbon. I don't follow what has specifically changed for you with 2013, for legacy purposes old style commandbar controls will be added to the 'Addins' tab on the ribbon and if your workbook is an addin they will appear in all instances of the Ribbon.