Is the workbook shared?
Limitations of shared workbooks
Some features of Microsoft Excel are not available when you use a shared workbook. If you need to use these features, do so before you share the workbook, or remove the workbook from shared use.
Macros
Write, change, view, record, or assign macros. However, you can record operations in a shared workbook into a macro stored in another workbook that isn't shared. In a shared workbook, you can run macros that were created before you shared the workbook; although if you run a macro that includes an unavailable operation, the macro stops running when it reaches the unavailable operation.