I have an Excel workbook that can create a new workbook based on a template which contains some VBA code. How do I protect the VBA code from both the template and the newly created workbooks using VBA?
When I manually put a password on the VBAProject of the template my Workbooks.Add "templateX.xltm" method fails because I guess it can't copy the templates content without a password. But I haven't found a property for Add in which I can pass on said password.