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()
12
12
End Sub
13
13
14
14
Private 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
16
16
17
17
On Error Resume Next
18
+ Call ExportInstallerModule
18
19
ThisWorkbook.VBProject.VBComponents.Remove ThisWorkbook.VBProject.VBComponents("Installer" )
19
20
On Error GoTo 0
20
21
21
22
End 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