networkdays does not work in excel when file opened through Access

N

navin

Hi,

i open an excel template and dump data from the access into the
template. once the data is in the template, i have to calculate the
number of working days between 2 dates (Request Open date and request
close date) but the formula networkdays fails to give the result (it
gives #NAME / #VALUE error).

I am not trying to calculate networkdays in access but invoking excel
and then i am trying to use this formula after declaring excel as
object.

any idea why the formula is not working? Please help!!

thanks,
navin
 
M

Maurice

Networkdays is a function which can be used when you have the Analysis
Toolpak activated.

Try taking a look under Tools- add in (in the menubar) and check the box in
front of Analysis Toolpak (it might ask you for the CD..)

hth
 
N

navin

Hi,

Thanks for the answer. i forgot to mention that, before i use the
formula i am selecting the add-in through below code:

Set xlWbA = xlObj.Workbooks.Open(xlObj.Application.LibraryPath & _
' "\Analysis\atpvbaen.xla")
' Set xlA = xlObj.AddIns.Add(xlObj.Application.LibraryPath & _
' "\Analysis\atpvbaen.xla")
' xlA.Installed = True

However i receive the same error.

thanks,
navin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top