Userform Defaults Text Box with Time

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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?

.



Relevant Pages

  • Re: Count all VLOOKUP() functions on worksheet
    ... But how do I get the number of cells containing VLOOKUP fomulas ... The below code fails to display the value Z ... Private Sub CommandButton1_Click ... MsgBox ("The number of cells containig VLOOKUP formula is " & A) ...
    (microsoft.public.excel.programming)
  • Re: Getting input within macro without the input box
    ... How about using a Worksheet_SelectionChange event and comment boxes to ... Be sure all the cells you want to user to enter data into have comment ... Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) ...
    (microsoft.public.excel.programming)
  • Why does it sounds every minute?
    ... Private Sub Worksheet_Change ... On Error GoTo 0 ... You see, cells ... Now although no "display" change is valid in the ...
    (microsoft.public.excel)
  • Re: Data input controls and methodology
    ... If any of the boxes contain 0 or text that evaluates to 0 then the result ... box would contain "Invalid Data". ... needed, you could display the results as the values are typed in, ... Private Sub Command1_Click ...
    (microsoft.public.vb.general.discussion)
  • Having trouble with "vbcr"
    ... When I use "vbcr" in trying to display text in text boxes and cells, ... Instead of my text being moved to the next line, the carriage return ...
    (microsoft.public.excel.programming)