When executed, create.wsf calls createOfficeApp() to create a Excel Workbook, named created.xlsm and then calls insertModule() to add a VBA module to the workbook.
With the module now added, the script executes application.run(…) to call the VBA submain which is defined in the module that just was inserted.
xls.save saves the newly created workbook.
Finally, appActivate is used to bring the Excel application to the front.
functions.bas
functions.bas is the module that is inserted with insertModule(). It contains the sub main which is called from the create.wsf script.
option explicit
sub main(projectRootDir as variant) ' {
'
' Note: the parameter(s) need to be declared as variant
' in Excel (apparently not so in Access).
'
activeSheet.cells(1,1) = "projectRootDir = " & projectRootDir
end sub ' }