Good afternoon, I’m trying to create a VSTO workbook for Excel 2013 and Excel 2016 through the wizard in VisualStudio 2012, the result is: enter image description here

Failed to enable programmatic access to the Microsoft Office Visual Basic for Applications project system. If MIcrosoft Office Word or Microsoft Office Excel is running, this may be the reason why software access is disabled. Exit Word or Excel before opening or creating a project.

Of course, all office applications are closed (tested immediately after a reboot)

What to do?

  • see some background processes - Grundy
  • in the Excel settings, by condition, access to VBA was blocked, it was necessary to enable "Trust access to the object model of VBA projects" in the Macro Parameters, but from hour to hour it is not easier; .xlsx is missing or damaged "even when creating a new empty book without using any other book or template as a basis. - Seight
  • And here it is? - Grundy
  • If you have independently found the answer to your question, you can post it - Grundy

1 answer 1

In Excel \ Word settings, by default, access to VBA is denied; you need to enable "Trust access to the VBA project object model" in the corresponding application in the Macro settings