Banner

Monday, March 13, 2017

Calculate Hour In Userform Excell VBA





Private Sub CommandButton1_Click()

Sheet1.Range("A100000").End(xlUp).Offset(1, 0).Value = Me.ComboBox1.Text

Sheet1.Range("A100000").End(xlUp).Offset(0, 1).Value = Me.TextBox1.Text

Sheet1.Range("A100000").End(xlUp).Offset(0, 2).Value = Me.TextBox2.Text

Sheet1.Range("A100000").End(xlUp).Offset(0, 3).Value = _

Abs(TimeValue(Me.TextBox2) - TimeValue(Me.TextBox1)) * 24

End Sub


1 comment:

  1. minute exactly not calculate bro like time in is 11:06 and time out is 13:09 its not calculate actual its doing in points

    ReplyDelete

Please do not enter any spam message in comment box