ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Networkdays to open previous day's file (https://www.excelbanter.com/excel-worksheet-functions/197083-networkdays-open-previous-days-file.html)

Dave

Networkdays to open previous day's file
 
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")

--
Thank you

Dave

Bob Phillips

Networkdays to open previous day's file
 
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)

"Dave" wrote in message
...
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")

--
Thank you

Dave




Dave

Networkdays to open previous day's file
 
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" wrote:

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)

"Dave" wrote in message
...
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")

--
Thank you

Dave





Bob Phillips

Networkdays to open previous day's file
 
Go into the VBIDE (Alt-F11)

Select your VBA project in the list

Goto ToolsReferences

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" wrote in message
...
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" wrote:

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)

"Dave" wrote in message
...
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")

--
Thank you

Dave








All times are GMT +1. The time now is 04:54 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com