Discussion Locked

Access2000 and the NETWORKDAYS FUNCTION

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I keep seeing reference to NETWORKDAYS_Worksheet function in the help library in Access2000. Can anyone tell me how I can get that to work? I have msowcf.dll on my system, but I'm not sure if there is something else I am supposed to do? The Access2000 help is pretty useless in this regard.

Thanks!

5 replies

by peyison

First, make sure you have a reference to the msowcf library.

From the Access 2000 VBA editor:

* Select Tools -> References...

* Check the item: Microsoft Office Web Components Function Library

* Press OK

The following sub shows how touse the NetWorkdays function:

Sub Test()
Dim oWebComp As MSOWCFLib.OCATP
Dim tDate1 As Date
Dim tDate2 As Date

Set oWebComp = New MSOWCFLib.OCATP

tDate1 = "1/1/01"
tDate2 = "1/31/01"

MsgBox oWebComp.NETWORKDAYS(tDate1, tDate2)

Set oWebComp = Nothing

End Sub

Hope this helps.

This discussion is closed to new replies.