Networkdays to open previous day's file

D

Dave

Hi,

I am trying to use the networkdays function to open a previous day's file. I
am receiving an error that the function is not defined. Why do I need to
define this Microsoft function? Any suggestions on how to open a previous
day's file that is saved as FileJul3108 excluding the day before if it was a
weekend day or holiday?

PrevSuffix = Format((NETWORKDAYS((DateAdd("d", -1, Date)), , HolidayList)),
"Mmmddyy")

HolidayList = Array("Sep0108", "Nov2708", "Dec2508", "Jan0109", "Jan1909",
"Feb1609", _
"Apr1009", "May2509", "Jul0309", "Sep0709", "Nov2609",
"Dec2509")
 
B

Bob Phillips

Set a reference to the Analysi Toolpak, atvbaen.xls, in the VBIDE.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
D

Dave

Thanks for your response Bob,

I am pretty new at coding in VBA so I don't understand what you mean.

--
Thank you

Dave


Bob Phillips said:
Set a reference to the Analysi Toolpak, atvbaen.xls, in the VBIDE.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
B

Bob Phillips

Go into the VBIDE (Alt-F11)

Select your VBA project in the list

Goto Tools>References

Scroll down until you see artpvbaen.xls, it should only be 6-10 down

Check that item and exit.

You should be able to reference NETWORKDAYS directly then.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

Dave said:
Thanks for your response Bob,

I am pretty new at coding in VBA so I don't understand what you mean.
 

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