Assigning Macros in MS Teams Excel Workbooks to Buttons

Copper Contributor

Good Afternoon everyone,

 

I have a workbook with a VBA Macro assigned to an Activex Control button. When opening the workbook I got an error message saying that form controls were not compatible outside of the MS Excel Desktop app.

 

To get around this problem, I removed the Activex form control and inserted a shape in to the workbook which had the macro assigned. when the workbook is open in Desktop, clicking on the shape prompts the macro to run, however when the same workbook is open in teams, clicking the shape just selects it and doesnt prompt the macro to run.

 

My question is: Are Macros completely incompatible with excel files hosted on MS Teams? And if they are, how do I add in a button or visual aid that once clicked, executes the macro?

 

TIA

 

Dan V

1 Reply

EDIT - 

Found the following which confirms that Macros cannot be executed in 'Excel for the Web' - you have to open the workbook in desktop app, run the macro and then switch back to the teams view.

Work with VBA macros in Excel for the web (microsoft.com)