A problem with a macro for Excel 2016 for Mac (from a french teacher)

Malingrey69

New Member
Joined
Jan 25, 2018
Messages
3
Hello guys

I’m not a very good user of Excel on Mac and i’m an occasional teacher. For many long time, I use a macro called « Stataix » withe help me to draw dot plot graphic. I know it’s inside Excel’16 now but I can do some thing with this macro I can’t do usually with the new version of Excel. This major allways work with PC (my PC’s owner student are happy) but doesn’t work with a mac. Can you take 5 minutes to tell me if there’s a solution…Or if I need to find myself a way to correct it ?


Many thanks for your possible answer.


Best regard


José



Code:
Option Explicit
Public Const APPNAME = "StatAix"
Public Const APPVERSION = "1.2"
Public Const StatAixCaption As String = APPNAME
Public Const DBoitamouCaption As String = "Donnees Boîte à moustaches"
Public Const DBoitamouMacro As String = "DonneesBoiteAMoustaches"
Public Const GBoitamouCaption As String = "Graph Boîte à moustaches"
Public Const GBoitamouMacro As String = "GraphBoiteAMoustaches"
Public Const DesinstallerCaption As String = "Desinstaller"
Public Const DesinstallerMacro As String = "Desinstaller"

Sub CreateMenu()
Dim XLCommandBar As Integer
Dim NewMenu As CommandBarPopup
Dim NewItem As CommandBarButton
Dim ToolsMenu As CommandBarPopup

XLCommandBar = 1 'Worksheet Menu Bar

' This code handles non-English versions of Excel
' in which the 'Tools' menu has a different name
Set ToolsMenu = CommandBars(XLCommandBar).FindControl(msoControlPopup, 30007)

' Delete the current menu if it exists (just in case)
On Error Resume Next
CommandBars(XLCommandBar).Controls(StatAixCaption).Delete
On Error GoTo 0

' Create the new menu item
Set NewMenu = CommandBars(XLCommandBar).Controls.Add(Type:=msoControlPopup) >>> This instruction doesn’t work on Mac. But works on a PC...
NewMenu.Caption = StatAixCaption
 
Last edited by a moderator:

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hello guys

I’m not a very good user of Excel on Mac and i’m an occasional teacher. For many long time, I use a macro called « Stataix » withe help me to draw dot plot graphic. I know it’s inside Excel’16 now but I can do some thing with this macro I can’t do usually with the new version of Excel. This major allways work with PC (my PC’s owner student are happy) but doesn’t work with a mac. Can you take 5 minutes to tell me if there’s a solution…Or if I need to find myself a way to correct it ?


Many thanks for your possible answer.


Best regard


José




<article>
Option Explicit
Public Const APPNAME = "StatAix"
Public Const APPVERSION = "1.2"
Public Const StatAixCaption As String = APPNAME
Public Const DBoitamouCaption As String = "Donnees Boîte à moustaches"
Public Const DBoitamouMacro As String = "DonneesBoiteAMoustaches"
Public Const GBoitamouCaption As String = "Graph Boîte à moustaches"
Public Const GBoitamouMacro As String = "GraphBoiteAMoustaches"
Public Const DesinstallerCaption As String = "Desinstaller"
Public Const DesinstallerMacro As String = "Desinstaller"

Sub CreateMenu()
Dim XLCommandBar As Integer
Dim NewMenu As CommandBarPopup
Dim NewItem As CommandBarButton
Dim ToolsMenu As CommandBarPopup

XLCommandBar = 1 'Worksheet Menu Bar

' This code handles non-English versions of Excel
' in which the 'Tools' menu has a different name
Set ToolsMenu = CommandBars(XLCommandBar).FindControl(msoControlPopup, 30007)

' Delete the current menu if it exists (just in case)
On Error Resume Next
CommandBars(XLCommandBar).Controls(StatAixCaption).Delete
On Error GoTo 0

' Create the new menu item
Set NewMenu = CommandBars(XLCommandBar).Controls.Add(Type:=msoControlPopup) >>> This instruction doesn’t work on Mac. But works on a PC...
NewMenu.Caption = StatAixCaption

</article>

Unfortunately, CommandBars are broken in 2016 for the Mac. I have yet to find a workaround, so I'm stuck in Office 2011 when working on my Mac.
 
Upvote 0

Forum statistics

Threads
1,223,099
Messages
6,170,114
Members
452,302
Latest member
TaMere

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top