Hi Guys,
I have a formula in my UserForm that give me h:mm, but the problem is I have staff that start at e.g. 09:00am and finishes at 02:00am, this formula I have give me return 7:00 hrs, when the return should be 17:00hrs. Does anyone know how to fix this?
I have a formula in my UserForm that give me h:mm, but the problem is I have staff that start at e.g. 09:00am and finishes at 02:00am, this formula I have give me return 7:00 hrs, when the return should be 17:00hrs. Does anyone know how to fix this?
VBA Code:
Private Sub cmdcalculate_Click()
TextBox1 = TextBox1.Text
TextBox2 = TextBox2.Text
TextBox3 = Format(CDate(TextBox2) - CDate(TextBox1), "h:mm")
End Sub