File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -12,10 +12,18 @@ Private Sub Workbook_Open()
1212End Sub
1313
1414Private Sub Workbook_BeforeSave (ByVal SaveAsUI As Boolean , Cancel As Boolean )
15- 'PURPOSE: Make sure that the Installer module is not included when the file is saved
15+ 'PURPOSE: Make sure that the Installer module is exported and then deleted, so it is not included when the file is saved
1616
1717 On Error Resume Next
18+ Call ExportInstallerModule
1819 ThisWorkbook.VBProject.VBComponents.Remove ThisWorkbook.VBProject.VBComponents("Installer" )
1920 On Error GoTo 0
2021
2122End Sub
23+
24+ Sub ExportInstallerModule ()
25+ Dim wb As Workbook
26+ Set wb = ThisWorkbook
27+ wb.VBProject.VBComponents("Installer" ).Export (wb.Path & "\Installer.bas" )
28+
29+ End Sub
You can’t perform that action at this time.
0 commit comments