Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default format userform text box


how can you format a userform textbox to display time ?

i have set the string as time format ????

how do i do this ?


--
Zygan
------------------------------------------------------------------------
Zygan's Profile: http://www.excelforum.com/member.php...o&userid=34423
View this thread: http://www.excelforum.com/showthread...hreadid=560575

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default format userform text box

what string?

just use

Format(TextBox1.Text,"hh:mm:ss")

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zygan" wrote in
message ...

how can you format a userform textbox to display time ?

i have set the string as time format ????

how do i do this ?


--
Zygan
------------------------------------------------------------------------
Zygan's Profile:

http://www.excelforum.com/member.php...o&userid=34423
View this thread: http://www.excelforum.com/showthread...hreadid=560575



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default format userform text box


sorry to sound completely newb but hay,

i have this code (not all of it but to the point)

"indate" is a textbox in the userform

Private Sub UserForm_Activate()
datein = Sheets("sheet1").Range("a2")

indate.Text = datein

End Sub


where do i put your code ????
if i place it anywhere in this code it errors ????


--
Zygan
------------------------------------------------------------------------
Zygan's Profile: http://www.excelforum.com/member.php...o&userid=34423
View this thread: http://www.excelforum.com/showthread...hreadid=560575

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,593
Default format userform text box

Private Sub UserForm_Activate()
datein = Sheets("sheet1").Range("a2")

indate.Text = Format(datein,"hh:mm:ss")

End Sub


If the cell is already formatted as time, you could use


Private Sub UserForm_Activate()

indate.Text = Sheets("sheet1").Range("A2").Text


End Sub

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Zygan" wrote in
message ...

sorry to sound completely newb but hay,

i have this code (not all of it but to the point)

"indate" is a textbox in the userform

Private Sub UserForm_Activate()
datein = Sheets("sheet1").Range("a2")

indate.Text = datein

End Sub


where do i put your code ????
if i place it anywhere in this code it errors ????


--
Zygan
------------------------------------------------------------------------
Zygan's Profile:

http://www.excelforum.com/member.php...o&userid=34423
View this thread: http://www.excelforum.com/showthread...hreadid=560575



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
Changing cell format - for example text to numeric sjrku Excel Discussion (Misc queries) 3 December 30th 05 10:40 PM
zip codes not being saved as text in CSV format MelissaM Excel Discussion (Misc queries) 5 September 9th 05 11:10 PM
insert text conditionally and format John Sawyer Excel Discussion (Misc queries) 3 August 17th 05 06:51 PM
Format Number to Text Roni Excel Worksheet Functions 2 May 17th 05 03:17 PM
Problem with wrap text format Mitch Excel Worksheet Functions 1 January 20th 05 09:46 AM


All times are GMT +1. The time now is 08:04 AM.

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"