Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
help calculate time
Hi, i'm a newbie... i need some help on how to calculate *time* and display it i textbox3. user inputs time start in textbox1 and user inputs time finished in textbox2 textbox3 = textbox2 - textbox1 how do i code it using vbscript? thanks so much -- kenrose0 ----------------------------------------------------------------------- kenrose08's Profile: http://www.excelforum.com/member.php...fo&userid=2231 View this thread: http://www.excelforum.com/showthread.php?threadid=56689 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
help calculate time
Take a look here at Chip's pages.
http://www.cpearson.com/excel/datetime.htm#AddingTimes -- Regards, Dave Patrick ....Please no email replies - reply in newsgroup. Microsoft Certified Professional Microsoft MVP [Windows] http://www.microsoft.com/protect "kenrose08" wrote: | | Hi, | i'm a newbie... | i need some help on how to calculate *time* and display it in | textbox3. | | user inputs time start in textbox1 and | user inputs time finished in textbox2 | | textbox3 = textbox2 - textbox1 | | how do i code it using vbscript? | | thanks so much! | | | -- | kenrose08 | ------------------------------------------------------------------------ | kenrose08's Profile: http://www.excelforum.com/member.php...o&userid=22317 | View this thread: http://www.excelforum.com/showthread...hreadid=566891 | |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
help calculate time
Hello kenrose08, This maybe more what you are looking for in VBA. Mytime = TimeValue(TextBox2.Text) - TimeValue(TextBox3.Text) '24 Hour Format TextBox3.Text = Format(Mytime, "hh:mm") 'AM PM format TextBox3.Text = Format(MyTime, "hh:mm AM/PM") If you need the seconds change "hh:mm" to "hh:mm:ss". Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=566891 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
help calculate time
thank you so much!!! Leith Ross Wrote: Hello kenrose08, This maybe more what you are looking for in VBA. Mytime = TimeValue(TextBox2.Text) - TimeValue(TextBox3.Text) '24 Hour Format TextBox3.Text = Format(Mytime, "hh:mm") 'AM PM format TextBox3.Text = Format(MyTime, "hh:mm AM/PM") If you need the seconds change "hh:mm" to "hh:mm:ss". Sincerely, Leith Ross -- kenrose08 ------------------------------------------------------------------------ kenrose08's Profile: http://www.excelforum.com/member.php...o&userid=22317 View this thread: http://www.excelforum.com/showthread...hreadid=566891 |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
help calculate time
thanks! i'll keep it for future reference... Dave Patrick Wrote: Take a look here at Chip's pages. http://www.cpearson.com/excel/datetime.htm#AddingTimes -- Regards, Dave Patrick ....Please no email replies - reply in newsgroup. Microsoft Certified Professional Microsoft MVP [Windows] http://www.microsoft.com/protect "kenrose08" wrote: | | Hi, | i'm a newbie... | i need some help on how to calculate *time* and display it in | textbox3. | | user inputs time start in textbox1 and | user inputs time finished in textbox2 | | textbox3 = textbox2 - textbox1 | | how do i code it using vbscript? | | thanks so much! | | | -- | kenrose08 | ------------------------------------------------------------------------ | kenrose08's Profile: http://www.excelforum.com/member.php...o&userid=22317 | View this thread: http://www.excelforum.com/showthread...hreadid=566891 | -- kenrose08 ------------------------------------------------------------------------ kenrose08's Profile: http://www.excelforum.com/member.php...o&userid=22317 View this thread: http://www.excelforum.com/showthread...hreadid=566891 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Excel 2007 calculate time between 2 date/time columns | Excel Discussion (Misc queries) | |||
Calculate the duration between the end time and start time of anot | Excel Worksheet Functions | |||
Calculate Ending time using Start Time and Elapsed Time | Excel Worksheet Functions | |||
IF statement to calculate time usage in specific time bands | Excel Worksheet Functions | |||
how to calculate time start & time finish in quarter hour | Excel Discussion (Misc queries) |