text box displaying time?

  • Thread starter Thread starter scrabtree23
  • Start date Start date
S

scrabtree23

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
 
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
 
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
 
Back
Top