Jump: Search:

Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access 2007/2010 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2010 (32 bit), 2007, 2003, 2002, 2000, and
Visual Basic 6.0!

Also available for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"The code is exactly how I would like to write code and the algorithms used are very efficient and well-documented."

Van T. Dinh, Microsoft MVP

 

 

 

 

 
Royalty free source code library modules for Microsoft Access, VB6, VBA, OfficeRoyalty free source code library modules for Microsoft Access, VB6, VBA, OfficeVBA and VB6 Source Code Library Download the free trial version of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA
Category: General VBA/VB6 : Date and Time
Description: Date and time routines, including business day math

Class: CBusinessDatesFile

Business day math (taking holidays into account) with holidays stored in a file

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CBusinessDatesFile class
Delimiter Property Gets the value to use to separate the Date/Time portion of the date file from the name of the holiday in the holiday file. The default value is "|"
HolidayCount Property Gets the count of holidays in the holiday list.
HolidayDate Property Gets the date of the specified holiday from the holiday list. You may read the value of this property in a loop construct by incrementing a counter from the value 1 to the value contained in the HolidayCount property.
HolidayName Property Gets the name of the specified holiday from the holiday list. You may read the value of this property in a loop construct by incrementing a counter from the value 1 to the value contained in the HolidayCount property.
AddBusinessDays Method Add or subtract a number of business days to a date. Weekend dates (Saturday and Sunday) are not counted in adding/subtracting days.
BusinessDaysInMonth Method Returns the number of business days in a month.
CheckBusinessDay Method Determine if a date is a business day and if not, find the next or previous business day. Weekend dates (Saturday and Sunday) are not counted as business days.
Class_Initialize Initialize Set initial values to defaults which may be overridden with property settings
DiffBusinessDays Method Returns the number of business days between two dates. The days are rounded down--it takes 24 hours to make a day. Weekend dates (Saturday and Sunday) and holidays are not counted.
DiffWeekdays Private Returns the number of weekdays between two dates. The days are rounded down (it takes 24 hours to make a day)
FindHoliday Private Locates a holiday in the private holiday array
HolidayDateFixed Method For fixed date holidays (New Year's, 4th of July, Christmas), returns the celebrated date based on Federal guidelines. i.e. Saturday dates are shifted to Friday, and Sunday dates are shifted to Monday.
HolidayTblWrite Private Add a line to the holiday file
LastDayOfWeekInMonth Private Calculates the last day (Sunday, Monday, etc.) of the month
LoadHolidayFile Method Loads the specified holiday file into the class. This method must be called before using any of the class methods to work with business days. You can auto-generate a sample file to use by calling the MakeHolidayFile method.
MakeHolidayFile Method Creates the holiday file with standard U.S. holidays filled in for each standard U.S. holiday between the years specified. After the file is generated you may modify it using a standard text editor such as Notepad.
MonthFirstBusinessDay Method Calculate the first business day of the month
MonthLastBusinessDay Method Calculate the last business day of the month
NthDayOfMonth Private Returns the date of the Nth day (Monday, Tuesday, etc.) of the month

Overview of Total Visual SourceBook

The source code in Total Visual SourceBook includes modules and classes for Microsoft Access, Visual Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily add this professionally written, tested, and documented royalty-free code into your applications to simplify your application development efforts.

Additional Resources

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence