Microsoft Y2K  
Microsoft
 This static CD-based web site is representative of the www.microsoft.com/y2k site as of October 15, 1999.

Microsoft Year 2000 Readiness Disclosure & Resource Center
Visual Basic for Applications 6.0  (Portuguese (Brazil)) - 32-Bit Win

Product Summary
Product: Visual Basic for Applications
Version: 6.0
Category: Compliant
Operating System: 32-Bit Win
Language: Portuguese (Brazil) Release Date: 25 Mar 1999
Operational Range: -
Can applications be built with this tool that adhere to the Microsoft Year 2000 Compliance Statement? Yes
Prerequisites: None
Product Dependencies: Windows 95, or Windows NT4 (Service Pack 3 or greater recommended)
Clock Dependencies: System Clock
Last Updated: 10 May 1999
Product Details

Visual Basic for Applications (VBA) 6.0

 

Can applications be built with this tool that adhere to the Microsoft Year 2000 Compliance Statement?

Yes

How the product runtime handles dates:

Products that have shipped with Visual Basic for Applications 6.0, include but are not limited to, the following: Excel 2000, Access 2000, Word 2000, Outlook 2000, PowerPoint 2000, Project 2000, FrontPage 2000

Since a common programming language (VBA 6.0) is used by Visual Basic, testing the intrinsic commands for date handling can test dates. These intrinsic functions for explicit date handling include:

Now ()

CDate()

CVDate()

DateValue()

Date()

Date$()

Format()

DateAdd()

DateDiff()

DatePart()

IsDate()

Day()

Month()

Weekday()

FormatDateTime()

Year()

VBA also performs implicit string to date conversions as in the following:

CStr(Variant that contains a VT_DATE)

A$ = Variant that contains a VT_DATE

Dim datevar as Date; A$ = datevar

Get #1, nPosition, theDate (where theDate has been defined as a VT_DATE)

Dates and times displayed can be obtained from the operating system clock, from user input, from date literals (eg #01/01/1999#) or from user data files. Dates are stored as part of a floating point number with the value to the left of the decimal representing the number of days past December 30, 1899. A date may be displayed in 2-digit format (by using the Visual Basic Format() function, for example) but the value is carried as a long 4-digit value.

When only given 2 digits, the product assumes the first 2 digits of the year according to a rule described below.

Two-digit shortcut handling:

The first 2 digits are assumed according to a specific rule in cases where only 2 digits are supplied for the date. The general rule is:

  • 2-digit dates between 00-29 are mapped to (2000-2029).
  • 2-digit dates between 30-99 are mapped to (1930-1999).

These are the defaults that users running Windows 95, Windows 98 and Windows NT4 experience. However, VBA uses OLE Automation for parsing dates and consequently, uses OLE AutomationÆs rules for handling years that have only 2 digits. The 100-year window illustrated above can be adjusted from the default through a control panel setting.

See the OLE Automation web site at: http://www.microsoft.com/technet/year2k/white/auto.htm to learn more about this behavior.

Common development errors dealing with year 2000 date issues:

User-defined functions are a prime area of date handling errors. A poorly written function may lead to problems.

Dates that are stored as strings can also produce unexpected results if the information is not input in an appropriate format. VBA will interpret a string as a date if, by rearranging the month/day/year order, a valid date can be found. For example, both 3/30/98 (March 30, 1998) and 87/3/1 (March 1, 1987) are valid dates although the month/day/year order has changed.

In general, custom VBA routines should use the intrinsic Date data type when storing date values, instead of using strings.

Testing guidelines and recommendations:

The MSDN on-line library includes information on developing Year 2000 compliant applications with Visual Studio and Visual Basic (see http://msdn.microsoft.com/library/techart/msdn_vs6y2k.htm). The guidelines described in this document apply equally to VBA as well as VB.

Users testing applications written in VBA should be especially careful to test the following problem areas:

  1. User-defined functions: Many applications contain user-defined functions written in Visual Basic for Applications to deal with dates in various ways. Many of these functions store date values as strings or write data to a disk file using the Put statement. Manipulating these values improperly can result in date handling errors that are outside of the scope of the testing that was done at Microsoft on the Year 2000 issue.
  2. The date usage error described above can cause problems if an error handling routine is meant to catch improperly entered dates. Since VBA rarely generates an error when a string date is used as an input, an error handling routine is unlikely to be called. In this case the proper programming technique would be to validate the data using code instead of relying on a runtime error to signal an improper date.

Return to Search Screen

Legend of Symbols:
* The product is compliant with recommended customer action. This indicates a prerequisite action is recommended which may include loading a software update or reading a document.
# The product is compliant with acceptable deviations from Microsoft's standard of compliance. An acceptable deviation does not affect the core functionality, data integrity, stability, or reliability of the product.
+ The product is compliant with pending Year 2000 software updates. Future maintenance actions will be recommended shortly. See Product Guide for further details.
Note: Compliance ratings given for each product assume that all recommended actions have been taken.

If after reviewing this information you have additional questions related to this product, click here.

 

YEAR 2000 READINESS DISCLOSURE

ALL COMMUNICATIONS OR CONVEYANCES OF INFORMATION TO YOU CONCERNING MICROSOFT AND THE YEAR 2000, INCLUDING BUT NOT LIMITED TO THIS DOCUMENT OR ANY OTHER PAST, PRESENT OR FUTURE INFORMATION REGARDING YEAR 2000 TESTING, ASSESSMENTS, READINESS, TIME TABLES, OBJECTIVES, OR OTHER (COLLECTIVELY THE "MICROSOFT YEAR 2000 STATEMENT"), ARE PROVIDED AS A "YEAR 2000 READINESS DISCLOSURE" (AS DEFINED BY THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT) AND CAN BE FOUND AT MICROSOFT'S YEAR 2000 WEBSITE LOCATED AT http://www.microsoft.com/year2000/ (the "Y2K WEBSITE"). EACH MICROSOFT YEAR 2000 STATEMENT IS PROVIDED PURSUANT TO THE TERMS HEREOF, THE TERMS OF THE Y2K WEBSITE, AND THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT FOR THE SOLE PURPOSE OF ASSISTING THE PLANNING FOR THE TRANSITION TO THE YEAR 2000. EACH MICROSOFT YEAR 2000 STATEMENT CONTAINS INFORMATION CURRENTLY AVAILABLE AND IS UPDATED REGULARLY AND SUBJECT TO CHANGE. MICROSOFT THEREFORE RECOMMENDS THAT YOU CHECK THE Y2K WEBSITE REGULARLY FOR ANY CHANGES TO ANY MICROSOFT YEAR 2000 STATEMENT. EACH MICROSOFT YEAR 2000 STATEMENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. CONSEQUENTLY, MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. MOREOVER, MICROSOFT DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF ANY MICROSOFT YEAR 2000 STATEMENT IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY MICROSOFT OR ITS AUTHORIZED REPRESENTATIVES SHALL CREATE A WARRANTY OR IN ANY WAY DECREASE THE SCOPE OF THIS WARRANTY DISCLAIMER. IN NO EVENT SHALL MICROSOFT OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER REGARDING ANY MICROSOFT YEAR 2000 STATEMENT INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS, PUNITIVE OR SPECIAL DAMAGES, EVEN IF MICROSOFT OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES, SO THE FOREGOING LIMITATION MAY NOT APPLY TO YOU. THE INFORMATION CONTAINED IN EACH MICROSOFT YEAR 2000 STATEMENT IS FOUND AT THE Y2K WEBSITE AND IS INTENDED TO BE READ IN CONJUNCTION WITH OTHER INFORMATION LOCATED AT THE Y2K WEBSITE, INCLUDING BUT NOT LIMITED TO MICROSOFT'S YEAR 2000 COMPLIANCE STATEMENT, THE DESCRIPTION OF THE CATEGORIES OF COMPLIANCE INTO WHICH MICROSOFT HAS CLASSIFIED ITS PRODUCTS IN ITS YEAR 2000 PRODUCT GUIDE, AND THE MICROSOFT YEAR 2000 TEST CRITERIA.

ANY MICROSOFT YEAR 2000 STATEMENTS MADE TO YOU IN THE COURSE OF PROVIDING YEAR 2000 RELATED UPDATES, YEAR 2000 DIAGNOSTIC TOOLS, OR REMEDIATION SERVICES (IF ANY) ARE SUBJECT TO THE YEAR 2000 INFORMATION AND READINESS DISCLOSURE ACT (112 STAT. 2386). IN CASE OF A DISPUTE, THIS ACT MAY REDUCE YOUR LEGAL RIGHTS REGARDING THE USE OF ANY SUCH STATEMENTS, UNLESS OTHERWISE SPECIFIED BY YOUR CONTRACT OR TARIFF.


 

Monday, September 20, 1999
1999 Microsoft Corporation. All rights reserved. Terms of use.

This site is being designated as a Year 2000 Readiness Disclosure and the information contained herein is provided pursuant to the terms hereof and the Year 2000 Information and Readiness Disclosure Act.