User Configuration > Administrative Templates > Microsoft Visio 2016 > Visio Options > Security > Macro Security
User
HKCU\software\policies\microsoft\office\16.0\visio\application
Enables creations of VBA projects when you open (or create) a document that does not already contain a project. If you clear this check box, you will not be able to create a macro in a document that does not already contain a project.