View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
D.S.[_3_] D.S.[_3_] is offline
external usenet poster
 
Posts: 60
Default Help with text box and time

My procedure records the system time in a worksheet cell (formatted as "time"), and at the same time, writes to a userform textbox the system time.

On userform activation, it will write recorded data from the spreadsheet to the userform.

The problem is, the time that was recorded on the userform, now shows as a decimal number, rather than the actual time displayed in the worksheet cell.

This is the line that writes to the spreadsheet, which results in <10:37 PM
Sheets("writeformdata").Range("B22").Value = Time

This line writes to userform upon activation, which results in <0.942615740740741
txtTime = Sheets("WRITEFORMDATA").Range("B22").Value

What's going on here?

D.S.