Importing Macro from older Excel to Excel 365 for Mac

%3CLINGO-SUB%20id%3D%22lingo-sub-1513296%22%20slang%3D%22en-US%22%3EImporting%20Macro%20from%20older%20Excel%20to%20Excel%20365%20for%20Mac%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1513296%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI'm%20trying%20to%20import%20a%20macro%20that%20works%20on%20an%20older%20version%20of%20excel%20but%20does%20not%20work%20on%20Excel%20for%20Mac%20365%20Office%20version.%20When%20I%20debug%2C%20this%20is%20the%20portion%20of%20code%20that%20presents%20with%20the%20line%20bolded%20and%20underlined%20below%20is%20what%20is%20highlighted.%20Is%20there%20a%20quick%20way%20to%20edit%20this%20to%20work%20on%20my%20version%20of%20Excel%3F%3C%2FP%3E%3CP%3E%3CBR%20%2F%3ESet%20MakeMenu%20%3D%20Application.CommandBars.ActiveMenuBar.Controls.Add%20_%3C%2FP%3E%3CP%3E(Type%3A%3DmsoControlPopup%2C%20temporary%3A%3DTrue)%3C%2FP%3E%3CP%3EWith%20MakeMenu%3C%2FP%3E%3CP%3E.Caption%20%3D%20%22%26amp%3BSPC%20Macros%22%3C%2FP%3E%3CP%3E%3CSTRONG%3E%3CEM%3E%3CU%3ESet%20MakeIDDistButton%20%3D%20.Controls.Add(Type%3A%3DmsoControlButton)%20%3C%2FU%3E%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%3CP%3EMakeIDDistButton.OnAction%20%3D%20%22Retrieve_Data%22%3C%2FP%3E%3CP%3EMakeIDDistButton.Caption%20%3D%20%22%26amp%3BIdentify%20Distribution%22%3C%2FP%3E%3CP%3EEnd%20With%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%3C%2FP%3E%3CP%3E%3CBR%20%2F%3EMichael%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1513296%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EExcel%20on%20Mac%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EMacros%20and%20VBA%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Highlighted
Occasional Visitor

Hi,

 

I'm trying to import a macro that works on an older version of excel but does not work on Excel for Mac 365 Office version. When I debug, this is the portion of code that presents with the line bolded and underlined below is what is highlighted. Is there a quick way to edit this to work on my version of Excel?


Set MakeMenu = Application.CommandBars.ActiveMenuBar.Controls.Add _

(Type:=msoControlPopup, temporary:=True)

With MakeMenu

.Caption = "&SPC Macros"

Set MakeIDDistButton = .Controls.Add(Type:=msoControlButton)

MakeIDDistButton.OnAction = "Retrieve_Data"

MakeIDDistButton.Caption = "&Identify Distribution"

End With

 

Thanks,


Michael

0 Replies