Option Explicit
Sub Test()
Dim S As String, D As Double
S = TxtHmm(0.5625)
D = HmmTxt(S)
MsgBox "TxtHmm(0.5625) = """ & S & """," _
& vbLf & "HmmTxt(""" & S & """) = " & D & ".", _
vbInformation, "Test"
End Sub
Function TxtHmm(ByVal Hmm As Double) As String
TxtHmm = Format(Hmm, "h:mm")
End Function
Function HmmTxt(ByVal Txt As String) As Double
HmmTxt = TimeValue(Txt)
End Function