Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you for taking the time to help.
"Bob Phillips" wrote in message ... Private Sub TextBox11_AfterUpdate() TextBox11.Value = Format(Application.Text(Replace(TextBox11.Value, ":", ""), "00\:00"), "hh:mm") End Sub Private Sub TextBox12_AfterUpdate() TextBox12.Value = Format(Application.Text(Replace(TextBox12.Value, ":", ""), "00\:00"), "hh:mm") End Sub Private Sub TextBox12_Exit(ByVal Cancel As MSForms.ReturnBoolean) TextBox13.Text = (TimeValue(TextBox12.Value) - TimeValue(TextBox11.Text)) * 24 End Sub -- __________________________________ HTH Bob "Patrick C. Simonds" wrote in message ... Sorry, but I am still having a problem. The code you gave me did exactly what I asked it to do, but when my TextBox12_Exit code runs (see cod below), I get a Type Mismatch error. Private Sub TextBox11_AfterUpdate() TextBox11.Value = Format(Application.Text(Replace(TextBox11.Value, ":", ""), "00\:00"), "hh:mm") End Sub Private Sub TextBox12_AfterUpdate() TextBox12.Value = Format(Application.Text(Replace(TextBox12.Value, ":", ""), "00\:00"), "hh:mm") End Sub Private Sub TextBox12_Exit(ByVal Cancel As MSForms.ReturnBoolean) TextBox13.Text = (TextBox12.Value - TextBox11.Value) * 24 End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Textbox for accepting TIME | Excel Programming | |||
How do I format a textbox with time | Excel Programming | |||
format textbox to time | Excel Discussion (Misc queries) | |||
TextBox and Time | Excel Programming | |||
Format As TIME In A TextBox | Excel Programming |