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: 470
Default Textbox for accepting TIME

I am using a userform to enter Time In/Out via textbox1 (in) & textbox2
(out). Time will be entered based on 24-hr clock, ie 10:00pm is 2200 or
22:00.

Question 1:
Is there a way to format the textbox to include the colon?

Question 2:
I will calculate the difference to determine total hours (with two decimal
places). Currently, this is how I have it (partial macro), but I am getting
zero as answer.
How is the best way to solve this?

DIM ttltime2 As DOUBLE
ttltime2 = VAL(Textbox2) - VAL(Textbox1)

Thanks and Happy New Year!!
Les


 
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
How do I format a textbox with time Jennifer Excel Programming 1 July 13th 06 06:27 AM
format textbox to time ASU Excel Discussion (Misc queries) 3 June 7th 06 10:05 PM
TextBox and Time Soniya[_4_] Excel Programming 2 December 3rd 05 07:17 AM
Format As TIME In A TextBox Minitman[_4_] Excel Programming 4 February 9th 05 12:55 AM
First textbox in form not accepting input properly Jack Excel Programming 4 October 7th 04 09:37 PM


All times are GMT +1. The time now is 07:06 AM.

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

About Us

"It's about Microsoft Excel"