We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1bcc76f commit 39e0751Copy full SHA for 39e0751
Installer.xls
2.5 KB
src/Installer.xls/ThisWorkbook.sheet.cls
@@ -12,10 +12,18 @@ Private Sub Workbook_Open()
12
End Sub
13
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
+'PURPOSE: Make sure that the Installer module is exported and then deleted, so it is not included when the file is saved
16
17
On Error Resume Next
18
+ Call ExportInstallerModule
19
ThisWorkbook.VBProject.VBComponents.Remove ThisWorkbook.VBProject.VBComponents("Installer")
20
On Error GoTo 0
21
22
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
0 commit comments