Make sure that “Trust access to the VBA project object model” option is enabled in Excel.

See this page about how you can access this option:

https://support.office.com/en-nz/article/Enable-or-disable-macros-in-Office-documents-7b4fdd2e-174f-47e2-9611-9efe4f860b12