Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Problem adding the values of 2 TextBoxes
Can anyone tell me why these do not add together?
TextBox1 = TextBox13.Value + TextBox23.Value Lets say the value of TextBox13 is 53 and the value of TextBox23 is 10. Instead of returning 63 I get 5310. Below is the code that generates the value of TextBox13 TextBox13.Value = (TimeValue(TextBox12.Value) - TimeValue(TextBox11.Value)) * 24 TextBox13.Value = Format(TextBox13.Value, "0.0000") TextBox12 value is entered by the user as a time without the : such as 1843 for 6:43 pm and then converted to the correct format by the code below Private Sub TextBox12_AfterUpdate() TextBox12.Value = Format(Application.Text(Replace(TextBox12.Value, ":", ""), "00\:00"), "hh:mm") End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Adding values in textboxes? | Excel Programming | |||
Adding values in textboxes? | Excel Programming | |||
Adding values in textboxes... | Excel Programming | |||
Adding values in textboxes... | Excel Programming | |||
Adding the values of 2 textboxes | Excel Programming |