No Support for Optional Arguments
Optional arguments are not supported in VBScript. The solution to this problem is to remove the optional arguments from the VBA methods (as shown below)
Public Function DaysInPeriod(dtSDate As Date, dtEdate As Date, dtPeriodStart As Date, dtPeriodEnd As Date, Optional bPercentageReturn As Boolean, Optional bYearSpecific As Boolean)
… changed to …
Public Function DaysInPeriod(dtSDate As Date, dtEdate As Date, dtPeriodStart As Date, dtPeriodEnd As Date, bPercentageReturn As Boolean, bYearSpecific As Boolean)
Single/Double Quoted Strings
VBScript does not appear to support single quoted strings. An initial investigation suggests that this will only affect formulas involving the DateDiff function. Due to the limited scope of this issue, a simple string replace (single quotes with their double quote counterpart) is applied to the formula prior to evaluation.