VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



It will find the difference between two days...

by Amit (2 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Mon 14th May 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

It will find the difference between two days...

API Declarations



Put Now in text1.text and text2.text

Put this code in the lost focus of text2.text

Rate It will find the difference between two days...



Text1.Text = Now
End Sub

Private Sub Text2_DblClick()
Text2.Text = Now
End Sub

Private Sub Text2_LostFocus()
On Error GoTo sr
Dim z As Variant
Dim z1 As Variant
z = Text1.Text
z1 = Text2.Text
Text3.Text = DateDiff("h", z, z1)
Exit Sub
sr:
MsgBox "Please press tab Key"
end sub

Download this snippet    Add to My Saved Code

It will find the difference between two days... Comments

No comments have been posted about It will find the difference between two days.... Why not be the first to post a comment about It will find the difference between two days....

Post your comment

Subject:
Message:
0/1000 characters