View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Mark Lincoln Mark Lincoln is offline
external usenet poster
 
Posts: 227
Default Userform Defaults Text Box with Time

Try this:

Private Sub UserForm_Activate()
Me.Time.Text = Worksheets("Data").Cells(2, 4).Text
End Sub

Matt wrote:
I'm using a userform for data entry purposes and it is set to call the
values currently in the cells to display in the text boxes. Example:
TextBox1 relates to the cell in row 2 column 4

Private Sub UserForm_Activate()
Me.Time.Text = Worksheets("Data").Cells(2, 4).Value
End Sub

My problem is that the value in row 2 column 4 is a time and on the
form it displays a decimal value

is there a way to make my text box display this number as a time
instead?