VB icon

Y2K Test for VB5 and 6

Email
Submitted on: 1/2/2015 5:36:00 AM
By: Preston Smith (from psc cd)  
Level: Not Given
User Rating: By 102 Users
Compatibility: VB 5.0, VB 6.0
Views: 1618
 
     This program test the Visual Basic program you are currently running. As you will see.
 
code:
Can't Copy and Paste this?
Click here for a copy-and-paste friendly version of this code!
				
'**************************************
' Name: Y2K Test for VB5 and 6
' Description:This program test the Visual Basic program you are currently running. As you will see.
' By: Preston Smith (from psc cd)
'
' Assumes:You can adjust the dates for Jan 1st 1930, Jan 1st 2029, Jan 1st 00 and Feb 29 or 30 2000. To see if your version is compliant then you should use 1/1/00 for the year 2000, and 2/29/00 for the Leap Year date (this will cause a run-time error, if NOT compliant). I made a big mistake before, the date regarding the leap year, should not cause a run time error 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 have an error that is good. If you actually see a date then your version of VB is not compliant with Y2K. The updates and patches may be available at microsoft's MSDN websight. Problems? Get the SP3 updates, Go here (VB6): http://msdn.microsoft.com/vstudio/sp/default.asp Go here (VB5): http://msdn.microsoft.com/vstudio/sp/vs97/default.asp
'**************************************

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


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments


 There are no comments on this submission.
 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.