You can keep the VB code from ever getting into the users workbook.
How's that?
1. Store the VB code in an AddIn,
2. In the template or workbook, the one having the numbers add subs
like these to remove the addin reference :
Private Function ReferenceExists(reference As String) As Boolean
Dim result As Boolean
result = False
On Error Resume Next
result = Not Me.VBProject.References(reference) Is Nothing
ReferenceExists = result
End Function
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
If ReferenceExists("MyExcellAddin") Then
WorkbookUtils.RemoveReferences Me
End If
End Sub