1
1
Attribute VB_Name = "Build"
2
2
'''
3
3
' Build instructions:
4
- ' 1. Open a new workbook in excel, then open the VB editor (Alt+F11) and from the menu File->Import, import these files :
4
+ ' 1. Open a new workbook in excel, then open the VB editor (Alt+F11) and from the menu File->Import, import this file :
5
5
' * src/vbaDeveloper.xlam/Build.bas
6
6
' 2. From tools references... add
7
7
' * Microsoft Visual Basic for Applications Extensibility 5.3
8
8
' * Microsoft Scripting Runtime
9
9
' 3. Rename the project to 'vbaDeveloper'
10
10
' 5. Enable programatic access to VBA:
11
11
' File -> Options -> Trust Center, Trust Center Settings, -> Macros,
12
- ' tick the box: 'Enable programatic access to VBA'
13
- ' 6. In VB Editor, press F4, then under Microsfoft Excel Objects, select ThisWorkbook.Set the property 'IsAddin' to TRUE
12
+ ' tick the box: 'Enable programatic access to VBA' (In excel '97: 'Trust access to the vba project object model')
13
+ ' 6. In VB Editor, press F4, then under Microsoft Excel Objects, select ThisWorkbook.Set the property 'IsAddin' to TRUE
14
14
' 7. In VB Editor, menu File-->Save Book1; Save as vbaDeveloper.xlam in the same directory as 'src'
15
15
' 8. Close excel. Open excel with a new workbook, then open the just saved vbaDeveloper.xlam
16
16
' 9. Let vbaDeveloper import its own code. Put the cursor in the function 'testImport' and press F5
@@ -21,7 +21,7 @@ Option Explicit
21
21
22
22
Private Const IMPORT_DELAY As String = "00:00:03"
23
23
24
- 'We need to make these variables public such that they can be read by application.ontime
24
+ 'We need to make these variables public such that they can be given as arguments to application.ontime()
25
25
Public componentsToImport As Dictionary 'Key = componentName, Value = componentFilePath
26
26
Public sheetsToImport As Dictionary 'Key = componentName, Value = File object
27
27
Public vbaProjectToImport As VBProject
@@ -285,6 +285,7 @@ End Sub
285
285
' Assumes any component with same name has already been removed.
286
286
Private Sub importComponent (vbaProject As VBProject , filePath As String )
287
287
Debug.Print "Importing component from " & filePath
288
+ 'This next line is a bug! It imports all classes as modules!
288
289
vbaProject.VBComponents.Import filePath
289
290
End Sub
290
291
@@ -356,5 +357,4 @@ Public Function addSheetToWorkbook(sheetName As String, workbookFilePath As Stri
356
357
Debug.Print "Skipping file " & sheetName & ". Could not open workbook " & workbookFilePath
357
358
addSheetToWorkbook = ""
358
359
End If
359
- End Function
360
-
360
+ End Function
0 commit comments