UNKNOWN '************************************** ' Name: Y2K Test for VB5 and 6 ' Description:This program test the Visu ' al Basic program you are currently runni ' ng. As you will see. ' By: Preston Smith ' ' ' Inputs:None ' ' Returns:None ' 'Assumes:You can adjust the dates for Ja ' n 1st 1930, Jan 1st 2029, Jan 1st 00 and ' Feb 29 or 30 2000. To see if your versio ' n is compliant then you should use 1/1/0 ' 0 for the year 2000, and 2/29/00 for the ' Leap Year date (this will cause a run-ti ' me error, if NOT compliant). I made a bi ' g mistake before, the date regarding the ' leap year, should not cause a run time e ' rror if it is compliant. ' 'Side Effects:If you set up the code to ' check for the leap year date you should ' have a run-time error. If you do NOT hav ' e an error that is good. If you actually ' see a date then your version of VB is no ' t compliant with Y2K. The updates and pa ' tches may be available at microsoft's MS ' DN websight. Problems? Get the SP3 updat ' es, Go here (VB6): http://msdn.microsoft ' .com/vstudio/sp/default.asp Go here (VB5 ' ): http://msdn.microsoft.com/vstudio/sp/ ' vs97/default.asp 'This code is copyrighted and has limite ' d warranties. 'Please see http://www.Planet-Source-Cod ' e.com/xq/ASP/txtCodeId.1776/lngWId.1/qx/ ' vb/scripts/ShowCode.htm 'for details. '************************************** Sub Form_Load() Dim MyDate as Date MyDate = "1/1/00" 'Or 'MyDate = "1/1/29" 'Returns 1/1/2029 'MyDate = "1/1/30" 'Returns 1/1/1930 'MyDate = "2/29/00" 'The Leap Year Date ' (Usually causes the most probs) MsgBox Format(MyDate, "mm/dd/yyyy") End Sub