The VBA that runs on Windows Office 365 Proplus and Excel 2013 will not run on Mac's Excel 2016 for Mac.
Regarding the following code that was listed as a sample, please let me know if it is a Mac version restriction or something that says Runtime Error 5 Procedure Call or argument is invalid
in the following parts.
Set NewM=CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlPopup)…
SubAddMenu()
Dim NewM As Variant, NewC As Variant
US>'(1) Create a menu called New Menu
Set NewM=CommandBars("Worksheet Menu Bar").Controls.Add(Type:=msoControlPopup)
With NewM
.Caption="New Menu (&C)"
End With
US>'(2) Register two commands in the menu you created.
Set NewC = NewM.Controls.Add
With NewC
.Caption="First Line Processing" 'First Command Name
.OnAction="Action_Row"' Macro to Run
.FaceId = 541
End With
Set NewC = NewM.Controls.Add
With NewC
.Caption="First column action" 'Second command name
.OnAction="Action_Column"' Macro to Run
.FaceId = 542
End With
End Sub
The Mac version of the VBA is not guaranteed.
I think I was lucky when I moved.
© 2024 OneMinuteCode. All rights reserved.