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
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