Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 343
Default TextBox to time

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
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
Textbox for accepting TIME WLMPilot Excel Programming 16 January 8th 08 06:58 PM
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


All times are GMT +1. The time now is 08:31 PM.

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"