Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculating Hours from Textbox Times
Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox8 < "" And TextBox9 < "" Then Label63 = (TextBox9.Value - TextBox8.Value) * 24 End Sub With the above line of code, i am trying to gain the value in Hours between the 2 textboxes, but i get an error. Textbox8.value = 3:30PM Textbox8.value = 7:30AM ?? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculating Hours from Textbox Times
Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean)
If TextBox8.Text < "" And TextBox9.Text < "" Then _ Label63.Caption = (TimeValue(TextBox9.Value) - _ TimeValue(TextBox8.Value)) * 24 End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Corey ...." wrote in message ... Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean) If TextBox8 < "" And TextBox9 < "" Then Label63 = (TextBox9.Value - TextBox8.Value) * 24 End Sub With the above line of code, i am trying to gain the value in Hours between the 2 textboxes, but i get an error. Textbox8.value = 3:30PM Textbox8.value = 7:30AM ?? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Calculating Hours from Textbox Times
Thank you BOB.
Perfect !! "Bob Phillips" wrote in message ... Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean) If TextBox8.Text < "" And TextBox9.Text < "" Then _ Label63.Caption = (TimeValue(TextBox9.Value) - _ TimeValue(TextBox8.Value)) * 24 End Sub -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Corey ...." wrote in message ... Private Sub TextBox9_Exit(ByVal Cancel As MSForms.ReturnBoolean) If TextBox8 < "" And TextBox9 < "" Then Label63 = (TextBox9.Value - TextBox8.Value) * 24 End Sub With the above line of code, i am trying to gain the value in Hours between the 2 textboxes, but i get an error. Textbox8.value = 3:30PM Textbox8.value = 7:30AM ?? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Hours between to two times | Excel Worksheet Functions | |||
Displaying calculated times - half-hours are not calculating... | Excel Worksheet Functions | |||
calculating times (hours and miniutes) on a time sheet | Excel Worksheet Functions | |||
Calculation of hourly rate times hours times 1.5 | Excel Worksheet Functions | |||
=Text(b2-A2,"h") hours between 2 times, what do I do for 10 times | New Users to Excel |