LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding values in textboxes? Tom Ogilvy Excel Programming 0 July 27th 04 08:29 PM
Adding values in textboxes? Bob Phillips[_7_] Excel Programming 0 July 27th 04 06:26 PM
Adding values in textboxes... Tom Ogilvy Excel Programming 0 July 27th 04 05:42 PM
Adding values in textboxes... Jake Marx[_3_] Excel Programming 0 July 27th 04 05:38 PM
Adding the values of 2 textboxes Ben Allen Excel Programming 3 April 29th 04 09:05 PM


All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"