954,568 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Runtime Error 424:

Hi folks,
In My Application i have used the date function to find the difference between two date.but while executing is showing that runtime erroe 424,object required.
Can anyone plz help me fast...

This is the code i have used

Dim date1, date2 As Date
Dim diff As Long
date1 = CDate(txtDOB.Text)
date2 = Date
diff = DateDiff(DateInterval.Month, date2, date1)
MsgBox diff

plz send the answer in my email also:jithusit@gmail.com

jithusdani
Light Poster
47 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

Hi folks, In My Application i have used the date function to find the difference between two date.but while executing is showing that runtime erroe 424,object required. Can anyone plz help me fast...

This is the code i have used

Dim date1, date2 As Date Dim diff As Long date1 = CDate(txtDOB.Text) date2 = Date diff = DateDiff(DateInterval.Month, date2, date1) MsgBox diff

plz send the answer in my email also:jithusit@gmail.com


DateInterval.Month is for Vb.Net
FOr VB use
diff = DateDiff("m", date2, date1)

sendtoanurag
Newbie Poster
2 posts since Jul 2007
Reputation Points: 10
Solved Threads: 0
 
DateInterval.Month is for Vb.Net FOr VB use diff = DateDiff("m", date2, date1)

Yes, agreed.
Just post code for vb 6 in this section friend :), cause there are section for vb.net

Jx_Man
Nearly a Senior Poster
3,329 posts since Nov 2007
Reputation Points: 1,372
Solved Threads: 444
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You