Excel VBA - NetworkDays (Excel VBA)

I would like to write a function to calculate the number of working days between two dates (including the time component of the date). Note that the Excel NETWORKDAYS function does not account for the time component. My initial plan was to write a function which used the Excel NETWORKDAYS function, however this does not appear to be available in VBA ?

Is there a way of calculating the number of working days between two dates including the time component in Excel VBA ?

Re: Excel VBA - NetworkDays (Excel VBA)

You can install the 'Analysis Toolpak - VBA' add-in (Tools | Add-Ins...), then set a reference in the Visual Basic Editor to the 'atpvbaen.xls' library (Tools | References...). This will make the Networkdays function available in VBA, along with many other functions from the Analysis Toolpak.