View Single Post
  #5 (permalink)  
Old 05-02-2008, 11:11 AM
Xav's Avatar   
Xav Xav is offline
Code Warrior
 
Join Date: Mar 2008
Location: London, England
Posts: 5,518
Last Blog:
Web slideshow in JavaS...
Rep Power: 46
Xav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to beholdXav is a splendid one to behold
Send a message via MSN to Xav
Default Re: Tutorial - Date Calculator!

Quote:
Originally Posted by $RaMRoM$ View Post
Thanks a lot travy92, your tuts are wonderful, BTW i just wanna say that maybe you can add Text Boxes and change:
Code:
Private Sub cmdCalc_Click()
Mint = DateDiff("d", "5/09/2007", "11/09/2007")
lstAnswer.AddItem "The day difference = " & Mint
End Sub
To:
Code:
Private Sub cmdCalc_Click()
Mint = DateDiff("d", Val(Text1.Text), Val(Text2.Text))
lstAnswer.AddItem "The day difference = " & Mint
End Sub
Just Saying! lol
I'm not sure your code will work. DateDiff() expects 3 string parameters, yet Val() returns a value. Maybe a DateTimePicker would be a better choice of control.
__________________
[TRUTH] TcM is the best moderator ever! [/TRUTH]
"Valid XHTML is like sex - everybody claims to have the same goal, but everybody has their own tricks and results vary wildly."
Mr. Xav | Website | Forums | Blog
Reply With Quote

Sponsored Links