Runtime Error 424:

Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: May 2008
Posts: 45
Reputation: jithusdani is an unknown quantity at this point 
Solved Threads: 0
jithusdani jithusdani is offline Offline
Light Poster

Runtime Error 424:

 
0
  #1
Jul 2nd, 2008
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
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 2
Reputation: sendtoanurag is an unknown quantity at this point 
Solved Threads: 0
sendtoanurag sendtoanurag is offline Offline
Newbie Poster

Re: Runtime Error 424:

 
0
  #2
Jul 2nd, 2008
Originally Posted by jithusdani View Post
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)
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 2,641
Reputation: Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light Jx_Man is a glorious beacon of light 
Solved Threads: 245
Jx_Man's Avatar
Jx_Man Jx_Man is offline Offline
Posting Maven

Re: Runtime Error 424:

 
0
  #3
Jul 2nd, 2008
Originally Posted by sendtoanurag View Post
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
Last edited by Jx_Man; Jul 2nd, 2008 at 11:18 am.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum


Views: 949 | Replies: 2
Thread Tools Search this Thread



Tag cloud for Visual Basic 4 / 5 / 6
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC