View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jamesp@premiercs.co.uk is offline
external usenet poster
 
Posts: 16
Default Problem using VBA for the Networkdays function

I am using VBA in MS project to enter information into Excel 2003. It
creates an instance and enters various dates. However if I put the
Newworkdays function into a cell (e.g. xlApp.range("D6").value =
"=networkdays(rc[-3],rc[-2])" where D4 and D5 are recognised dates I get the
#NAME? error message. The Add-ins for the Analysis toolpak have been ticked.


I tried running code to turn the analysis toolpak off and then on
programatically but still the same error message

Any ideas how this can be fixed?

Many thanks

James