Hi, you'll have to amend this code to however your form is set up ie whether it's called with a button but for my testing purposes I used the form initialization event.
Private Sub UserForm_Initialize()
Dim ws As Worksheet
Dim rng As Range
Dim lblStr As String
Me.Label1.Caption = "04:32:56"
lblStr = Me.Label1.Caption
Set ws = Worksheets("Sheet1")
Set rng = ws.Range("J7")
With rng
.Value = Left(lblStr, 2)
lblStr = Replace(lblStr, Left(lblStr, 3), "")
.Offset(0, 1).Value = Left(lblStr, 2)
lblStr = Replace(lblStr, Left(lblStr, 3), "")
.Offset(0, 2).Value = Left(lblStr, 2)
lblStr = ""
End With
End Sub
There's no doubt other ways to do this but I inserted just string values into the cells, not time formatted. Give it a try and let me know if they have to maintain the time formats.
Bookmarks