11Attribute VB_Name = "Build"
22'''
33' 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 :
55' * src/vbaDeveloper.xlam/Build.bas
66' 2. From tools references... add
77' * Microsoft Visual Basic for Applications Extensibility 5.3
88' * Microsoft Scripting Runtime
99' 3. Rename the project to 'vbaDeveloper'
1010' 5. Enable programatic access to VBA:
1111' 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
1414' 7. In VB Editor, menu File-->Save Book1; Save as vbaDeveloper.xlam in the same directory as 'src'
1515' 8. Close excel. Open excel with a new workbook, then open the just saved vbaDeveloper.xlam
1616' 9. Let vbaDeveloper import its own code. Put the cursor in the function 'testImport' and press F5
@@ -21,7 +21,7 @@ Option Explicit
2121
2222Private Const IMPORT_DELAY As String = "00:00:03"
2323
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()
2525Public componentsToImport As Dictionary 'Key = componentName, Value = componentFilePath
2626Public sheetsToImport As Dictionary 'Key = componentName, Value = File object
2727Public vbaProjectToImport As VBProject
@@ -285,6 +285,7 @@ End Sub
285285' Assumes any component with same name has already been removed.
286286Private Sub importComponent (vbaProject As VBProject , filePath As String )
287287 Debug.Print "Importing component from " & filePath
288+ 'This next line is a bug! It imports all classes as modules!
288289 vbaProject.VBComponents.Import filePath
289290End Sub
290291
@@ -356,5 +357,4 @@ Public Function addSheetToWorkbook(sheetName As String, workbookFilePath As Stri
356357 Debug.Print "Skipping file " & sheetName & ". Could not open workbook " & workbookFilePath
357358 addSheetToWorkbook = ""
358359 End If
359- End Function
360-
360+ End Function
0 commit comments