Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default text box displaying time?

On a userform, I placed a text box that ties to a cell in
a worksheet that displays a time. However, the text box
converts the time to serial code. How do I make the text
box display the time as time?

SDC
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default text box displaying time?

Hi

Use property Text instead of Value to call the value of the cell. For
example in the Initialise event I have:

Private Sub UserForm_Initialize()

TextBox1.Text = Cells(1, 1)*.Text*

End Sub

The Text property takes the data as formatted rather than its true
value.

Tom
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default text box displaying time?

the easiest approach in my opinion is to load the textbox with a string
rather than using a control source. Clear your control source and in the
userform initialize event

Textbox1.Text = Worksheets(1).Range("A1").Text

--
Regards,
Tom Ogilvy


"scrabtree23" wrote in message
...
On a userform, I placed a text box that ties to a cell in
a worksheet that displays a time. However, the text box
converts the time to serial code. How do I make the text
box display the time as time?

SDC



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
Entering and displaying time jdj420 Excel Discussion (Misc queries) 1 April 14th 10 10:08 PM
Displaying negative time Babs Excel Discussion (Misc queries) 8 March 2nd 09 08:18 PM
Displaying Time in Excel gfkbob[_2_] Excel Discussion (Misc queries) 3 March 30th 07 02:42 AM
Displaying time from 00:00 to 0.00 North for Short New Users to Excel 6 June 28th 06 05:45 AM
Displaying Unix time as date and time [email protected] Excel Discussion (Misc queries) 1 May 30th 06 10:28 PM


All times are GMT +1. The time now is 02:03 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"