Skip to content

Commit 535a1dd

Browse files
committed
Installer.xls
Installer.xls should not include the installer module in its source file, but import in on open everytime.
1 parent fe56355 commit 535a1dd

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

Installer.xls

-14.5 KB
Binary file not shown.

src/Installer.xls/Sheet1.sheet.cls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Option Explicit
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Option Explicit
2+
3+
Private Sub Workbook_Open()
4+
'PURPOSE: Download the content of the installer.bas file to be run by this file.
5+
6+
On Error Resume Next
7+
ThisWorkbook.VBProject.VBComponents.Remove ThisWorkbook.VBProject.VBComponents("Installer")
8+
On Error GoTo 0
9+
10+
ThisWorkbook.VBProject.VBComponents.Import ThisWorkbook.Path & "\Installer.bas"
11+
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
16+
17+
On Error Resume Next
18+
ThisWorkbook.VBProject.VBComponents.Remove ThisWorkbook.VBProject.VBComponents("Installer")
19+
On Error GoTo 0
20+
21+
End Sub

0 commit comments

Comments
 (0)