Hi,
I have problem with time format in userform textbox which is populated from cell.
So, on Sheet3 in column BE i have cells formated as [h]:mm. Value inputed for ie is 80:00 (as in 80 hours). With my code TextBox5 is displaying 8:00:00 (like in my formula bar on worksheet is 3.1.1900 8:00:00).
Can someone please help me my textbox to display 80:00 if in cell is entered 80:00.
My code:
Thnx,
Kind Regards,
Matija
I have problem with time format in userform textbox which is populated from cell.
So, on Sheet3 in column BE i have cells formated as [h]:mm. Value inputed for ie is 80:00 (as in 80 hours). With my code TextBox5 is displaying 8:00:00 (like in my formula bar on worksheet is 3.1.1900 8:00:00).
Can someone please help me my textbox to display 80:00 if in cell is entered 80:00.
My code:
Code:
Private Sub ComboBox9_change()
lokacija = Me.ComboBox4.Value
odsjek = Me.ComboBox6.Value
naziv = Me.ComboBox7.Value
Modul = Me.ComboBox8.Value
Dim i As Integer
Dim LR As Long
LR = Sheet3.Range("AZ" & Rows.Count).End(xlUp).Row
For i = 2 To LR
If Sheet3.Cells(i, "AZ") = lokacija _
And Sheet3.Cells(i, "BA") = odsjek _
And Sheet3.Cells(i, "BB") = naziv _
And Sheet3.Cells(i, "BC") = Modul Then _
Me.TextBox5.Value = Format(Sheet3.Cells(i, "BE"), "hh:mm")
Next i
End Sub
Thnx,
Kind Regards,
Matija