Macros and Programming


CardboxForumsMacros and Programming > "Calculating elapsed workdays"

Calculating elapsed workdays

How to duplicate Excel's NETWORKDAYS in Cardbox macros

Posted By Post

West Sussex Knowledge

6-Apr-2016 09:26

Hi, I use Cardbox to monitor work activity and we record the date an enquiry was received and the date it was completed. In Excel I can use NETWORKDAYS to work out the elapsed time, excluding weekends and holidays. Is that possible with VBScript macros?


6-Apr-2016 11:31

VB Script does not support NETWORKDAYS. However, if you have also Excel on your Pc is the solution close:
Make a Cardbox macro with these commands:
-start an invisible copy of Excel
- Enter in A1 the first date
- Enter in B1 second Date
- Enter in C1 the Formula to calculate
- Read the result of C1 into a variable
- Enter the variable into Cardbox
- Close the invisible copy of Excel
Works. I just tested it with E2003 as well as E2010 (win7 64 b)

West Sussex Knowledge

6-Apr-2016 13:12

Thanks. I'll have a go.

© 2010 Cardbox Software Limited   Home