With sharing, do you mean to say generating a share link for sometime or you are working in collaboration with another user using MS Office Online ?
I ask coz although you can open a workbook that contains macros—though you won't be able to see the macros, you can't work with macros in Excel Online. You can edit the worksheets and save a workbook containing macros in Excel Online. The macros will remain in the workbook, and you open the workbook in the Excel desktop application to view and edit the macros.
Correct me if I understood you wrong.
PS. Help others find answers by selecting "Accept as Solution" if a post answers your question."